And hard-bind the keys Ctrl+Up and Ctrl+Down to these functions.
Unlike the paragraph-jumping code, these new functions disregard
any indentation, treating only blank lines as separators. They
also do an automatic smart home when that option is set.
This fulfills https://savannah.gnu.org/bugs/?48291.
Per https://doc.rust-lang.org/reference.html#fn2, non-ASCII characters are
currently not allowed in stable Rust, so keep it ASCII-only for now.
Signed-off-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
Also, compose the coloring attributes during initialization
instead of every time when painting something.
Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Instead of referring to a window that might have been deleted by a
resize, just turn the keypad back on for the two windows from which
input might have been requested.
Also: don't insert KEY_WINCH as the verbatim keystroke.
This fixes https://savannah.gnu.org/bugs/?48532.
This allows the user to specify which other characters, besides the
default alphanumeric ones, should be considered as part of a word, so
that word operations like Ctrl+Left and Ctrl+Right will pass them by.
Using this option overrides the option --wordbounds.
This fulfills https://savannah.gnu.org/bugs/?47283.
When the user changes her mind after having pressed Esc, she cannot
unpress Esc, so do that for her by ignoring the escape code when
the subsequent keycode is outside of the normal printable range.
This restores the behavior from before nano-2.3.5 -- except that
Ctrl+Alt+key continues to report an unbound key.
This fixes https://savannah.gnu.org/bugs/?48459.
This prevents many keycode sequences from being misconstrued when a
command key plus other keystrokes accumulate in the input buffer.
This fixes https://savannah.gnu.org/bugs/?48395.
Add them so that <Esc> followed by <Home> will simply do "Home" instead of
reporting an unbound key. The same for <End>, <PageUp> and <PageDown>.
This restores the behavior from before nano-2.3.5.
It is easy to type beside the comma key and hit instead "m" or ".", so
accept also these as a separator between line and column number. And
when being generous anyway, also accept space, slash and semicolon.
This fulfills https://savannah.gnu.org/bugs/?48305.
Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
Precalculation of the multiline color data can be cut short when the
user is impatient and starts typing. But this would drop the first
byte of whatever was typed -- not nice when it was just plain text,
but surprising and worse when the first keystroke was a command.
This fixes https://savannah.gnu.org/bugs/?48388.
When for a multiline syntax-coloring rule the starting regex matches at
the exact same spot as the ending regex, do a second round of resets, so
that reevaluation starts further back and gets a few more things right.
This mildly fixes https://savannah.gnu.org/bugs/?47420.
When we get a ^J as verbatim input, it is not possible to include it
into the file buffer or the prompt answer, because this would mean
adding an encoded null to the buffer or answer, and that is not what
the user intended. One option would have been to simply ignore a ^J
in verbatim input. But the choice has been made to act the same way
as when the ^J (0x0A) is found in the file data: start a new line.
That is the same response as to the Enter key, yes -- but the code
for the Enter key is ^M (0x0D), not ^J. So, to be more precise,
rename the relevant variable from 'got_enter' to 'got_newline'.