When using the internal spell checker, the message gets overwritten
immediately by "Creating misspelled word list...", and when using
the external spell checker, nano immediately exits from curses mode
and thus the message disappears (when in a terminal emulator) or it
soon gets wiped by the spell checker (when on a Linux console), thus
creating a little flash on the bottom row, which we can do without.
In the past, SIGWINCHes were responded to immediately (which was madness),
but since commit 75d64e67 all a SIGWINCH does is set a flag so that, when
the time comes to update the screen, nano knows the dimensions may have
changed. The mentioned commit removed most blockings and unblockings of
SIGWINCH, but not this one.
Assume that 'print' and 'exec' are statements when they are followed
by whitespace, and are functions otherwise. This does not highlight
"print'x'" nor "print{x}", but these statements are poor style.
Signed-off-by: Benjamin Mintz <bmintz@protonmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
So that the user can do 'bind ^H cutwordleft all' in their nanorc
to make ^H (and sometimes also <Ctrl+Backspace>) delete the word
to the left of the cursor while <Backspace> continues to delete
just one character.
As the statusbar() function will write the position directly to the
terminal when not in curses mode, the final part of this position
message will seem to be after the prompt when exiting from nano.
The cursor position will get written correctly to the status bar
anyway, because returning from suspension enters a fake key into
the keyboard buffer, and this key elicits an update of the display.
This fixes https://savannah.gnu.org/bugs/?54639.
Reported-by: Lauri Kasanen <cand@gmx.com>
Bug existed since version 2.4.2, commit 75d64e67.
Most of these toggles just change the appearance of things, and
all of them are harmless -- none of them modify the contents of
the buffer.
This fixes https://savannah.gnu.org/bugs/?54650.
Reported-by: Liu Hao <lh_mouse@126.com>
Bug existed since version 2.9.4, commit 54103d8e.
(The offending commit meant in the previous commit was 60f1090d.
My mistake.)
Switching to Replace allows modifiying the buffer, which should
not be possible in view mode.
This fixes https://savannah.gnu.org/bugs/?54649.
Bug existed since version 2.9.4, commit 54103d8e.
Signed-off-by: Liu Hao <lh_mouse@126.com>
When curses gives no code for Ctrl+Shift+Delete, do not fall back
to KEY_BACKSPACE, because then ^H and/or <Backspace> get bound to
'cutwordleft'.
This fixes https://savannah.gnu.org/bugs/?54642.
Bug was introduced with version 3.0, commit e6429e78.
That is, wait with deleting words until they start under cursor,
so the user can see which word is goin to be eaten, and join lines
only when the cursor already sits at the edge of a line.
On FreeBSD and NetBSD (when reached through ssh from a Linux machine)
this has the absurd effect of making <Ctrl+Backspace> do a 'cutwordleft'
by default, out of the box, without needing any rebindings. Weird, but
wonderful, because the ideal behavior.
Also ensure that <Shift+Delete> always does a Backspace.
This makes that we have the following set of "congruent" keys:
<Tab> moves text to the right,
<Shift+Tab> moves text to the left,
<Delete> "eats" a character to the right,
<Shift+Delete> "eats" a character to the left,
<Ctrl+Delete> "eats" a word to the right,
<Shift+Ctrl+Delete> "eats" a word to the left.
Also, don't partially color "..." as an operator, because it isn't,
and color also the unary operator "#".
Signed-off-by: Mark-Weston <markweston@cock.li>
Adding "[abc]*" does not restrict the recognized header line in any way.
Also, improve the header-line regex for shell scripts, because it should
not match "barunscript" (for example).
If find_paragraph() detects that we're not in a paragraph, it moves
forward a paragraph and then backward to that paragraph's beginning.
Make it check whether we're in a paragraph before moving backward
(since there might not *be* any more paragraphs), to prevent going
forth-and-back and never reaching the end of the buffer.
This fixes https://savannah.gnu.org/bugs/?54573.
These are available in the menus where they are relevant: the Write-Out
and the Insert menu, respectively. Having them duplicated in the main
menu is inconsistent and eats precious keystrokes. (Sorry, Chris.)