You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicate Lines Down behaves slightly differently to other editors (Eclipse, VS Code) in a way that seems strange.
Given the example text:
abc
def
ghi
jkl
To duplicate the middle two lines, I would position the cursor at the start of abc and then *shift+down twice to highlight abc and ghi. The cursor is positioned at the start (left) of jkl. Performing Duplicate Lines Down at this point will duplicate def, ghi and jkl. Other editors tend to not duplicate the last line when the cursor is at the start of the line.
I have locally changed DuplicateAction.kt, adding - 1 to the endLine.
endingLine = document.getLineNumber(end - 1)
This seems to sort it but I haven't fully tested it (selecting from down to up, or performing Duplicate Lines Up).
Could this be changed or made configurable?
As an aside, this plug-in was recommend to me by Jet Brains as not having Duplicate Lines Up was stopping me from moving to their IDEs. Thank you for this plug-in.
The text was updated successfully, but these errors were encountered:
Hi, thanks for filling out this issue.
You're right, I will try to fix it as soon as I can, but till then if you could fix it, I would be happy to merge your PR!
And I'm glad that my plugin could help someone... !
Duplicate Lines Down behaves slightly differently to other editors (Eclipse, VS Code) in a way that seems strange.
Given the example text:
abc
def
ghi
jkl
To duplicate the middle two lines, I would position the cursor at the start of abc and then *shift+down twice to highlight abc and ghi. The cursor is positioned at the start (left) of jkl. Performing Duplicate Lines Down at this point will duplicate def, ghi and jkl. Other editors tend to not duplicate the last line when the cursor is at the start of the line.
I have locally changed DuplicateAction.kt, adding - 1 to the endLine.
endingLine = document.getLineNumber(end - 1)
This seems to sort it but I haven't fully tested it (selecting from down to up, or performing Duplicate Lines Up).
Could this be changed or made configurable?
As an aside, this plug-in was recommend to me by Jet Brains as not having Duplicate Lines Up was stopping me from moving to their IDEs. Thank you for this plug-in.
The text was updated successfully, but these errors were encountered: