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
Issue
Pressing Ctrl+Shift+D to duplicate a line works as intended when the cursor is before a char in the line but duplicates the next line too if used at the end.
Steps to reproduce
Cursor before char in line:
L i n|e 1
L i n e 2
after ctrl+shift+d
L i n|e 1
L i n e 1
L i n e 2
------
Cursor at end of line:
L i n e 1|
L i n e 2
ctrl+shift+d
L i n e 1|
L i n e 2
L i n e 1
L i n e 2
Expected behaviour
Only the current line should be duplicated.
L i n e 1|
L i n e 2
ctrl+shift+d
L i n e 1|
L i n e 1
L i n e 2
Other information
Minor gripe but I think it should also be a single undo to get rid of the duplicated line. Currently, you have to press ctrl+z twice:
L i n|e 1
L i n e 2
ctrl+shift+d
L i n|e 1
L i n e 1
L i n e 2
ctrl+z
L i n e 1
|
L i n e 2
ctrl+z
L i n e 1|
L i n e 2
The text was updated successfully, but these errors were encountered:
This fixes issue #643. When cursor is at the end of the line, old
version would duplicate two lines: The line where the cursor is, and the
line following it. This happened because the buffer that is being copied
would include both lines and the newline separating them. This fix
checks if there are multiple lines in the current buffer, and if so,
moves buffers end iterator to the newline character, so that only the
line where cursor is located is duplicated.
Issue
Pressing Ctrl+Shift+D to duplicate a line works as intended when the cursor is before a char in the line but duplicates the next line too if used at the end.
Steps to reproduce
Cursor before char in line:
after ctrl+shift+d
------
Cursor at end of line:
ctrl+shift+d
Expected behaviour
Only the current line should be duplicated.
ctrl+shift+d
Other information
Minor gripe but I think it should also be a single undo to get rid of the duplicated line. Currently, you have to press ctrl+z twice:
ctrl+shift+d
ctrl+z
ctrl+z
The text was updated successfully, but these errors were encountered: