## Move Down Current Line keyboard shortcut is broken in v4.1
## I've tried remapping the keys to no avail.
## As long as there is text in the next line it works.
## Once there is an empty line below, it stops working.
## Examples below:
## Works
##--begin example--
Text to be moved on this line. ## Ctrl+Shift+DOWN ARROW works for this line.
Some text here.
##--end example--
##Doesn't work
##--begin example--
Text to be moved on this line. ## Ctrl+Shift+DOWN ARROW does not work for this line.
Some text here.
##--end example--
## I tested this function in previous versions prior to this post,
## it works in 4.0.2 and prior.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems this issue has been solved with Scintilla 1.74 correcting the TransposeLine function.
ScintillaHistory.html (2007-06-17 14:00) says:
Release 1.74
* Released on 15 June 2007.
...
* Bug fixed with SCI_LINETRANSPOSE on a blank line.
NotePad++ was built using Scintilla 1.73, as the source package reveals.
Don, is there a reason why release 1.74 wasn't used?
There is a small bug in moving the top line up and the bottom line down.
See ScintillaEditView.h, lines 486 to 510.
The currentLineUp() and currentLineDown() procedures do check the cursor for being on the first and last line respectively, before executing any real change. However, these procedures always _do_ set the start of an Undo action (lines 487 and 500):
execute(SCI_BEGINUNDOACTION); is called first, outside the if statement that checks for the 'impossible' line and consequent action (lines 490 and 503).
This won't be noticed if you immediately undo the previous action (the one before trying to move the current line). However, undoing the first change after the unsucessful action, will also undo the change immediately preceding it.
Could you fix this?
It's a bad thing you can't use CTRL+SHIFT+DOWN here, because of the empty lines 488 and 501. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I, too, find it very annoying that Move Line Down, CTRL+SHIFT+Down, stops at an empty line. The text line to be moved is left and next only the empty line will move down. Moving lines up this way doesn't suffer from this.
...
Also, when moving a line up or down by using CTRL+SHIFT+Up/Down, the bookmarks won't be updated.
They will be if you cut and paste a selection, i.e. the bookmark will move down or up the corresponding number of lines.
When moving a line up with Ctrl+Shift+Up arrow key, a bookmark on the moved-to line will remain there, meaning that in fact it moves up one line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for pointing that out. I tried searching the posts before I made mine, but I guess I didn't use the right key words.
Regardless of the bug, it's a wonderful application, don't know what I'd do without it. Keep up the great work Don!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
## Move Down Current Line keyboard shortcut is broken in v4.1
## I've tried remapping the keys to no avail.
## As long as there is text in the next line it works.
## Once there is an empty line below, it stops working.
## Examples below:
## Works
##--begin example--
Text to be moved on this line. ## Ctrl+Shift+DOWN ARROW works for this line.
Some text here.
##--end example--
##Doesn't work
##--begin example--
Text to be moved on this line. ## Ctrl+Shift+DOWN ARROW does not work for this line.
Some text here.
##--end example--
## I tested this function in previous versions prior to this post,
## it works in 4.0.2 and prior.
It seems this issue has been solved with Scintilla 1.74 correcting the TransposeLine function.
ScintillaHistory.html (2007-06-17 14:00) says:
Release 1.74
* Released on 15 June 2007.
...
* Bug fixed with SCI_LINETRANSPOSE on a blank line.
NotePad++ was built using Scintilla 1.73, as the source package reveals.
Don, is there a reason why release 1.74 wasn't used?
There is a small bug in moving the top line up and the bottom line down.
See ScintillaEditView.h, lines 486 to 510.
The currentLineUp() and currentLineDown() procedures do check the cursor for being on the first and last line respectively, before executing any real change. However, these procedures always _do_ set the start of an Undo action (lines 487 and 500):
execute(SCI_BEGINUNDOACTION); is called first, outside the if statement that checks for the 'impossible' line and consequent action (lines 490 and 503).
This won't be noticed if you immediately undo the previous action (the one before trying to move the current line). However, undoing the first change after the unsucessful action, will also undo the change immediately preceding it.
Could you fix this?
It's a bad thing you can't use CTRL+SHIFT+DOWN here, because of the empty lines 488 and 501. :)
See also the thread "Feature Request: Delete current line shortcut":
http://sourceforge.net/forum/forum.php?thread_id=1732887&forum_id=331753
It states:
I, too, find it very annoying that Move Line Down, CTRL+SHIFT+Down, stops at an empty line. The text line to be moved is left and next only the empty line will move down. Moving lines up this way doesn't suffer from this.
...
Also, when moving a line up or down by using CTRL+SHIFT+Up/Down, the bookmarks won't be updated.
They will be if you cut and paste a selection, i.e. the bookmark will move down or up the corresponding number of lines.
When moving a line up with Ctrl+Shift+Up arrow key, a bookmark on the moved-to line will remain there, meaning that in fact it moves up one line.
Thanks for pointing that out. I tried searching the posts before I made mine, but I guess I didn't use the right key words.
Regardless of the bug, it's a wonderful application, don't know what I'd do without it. Keep up the great work Don!