When doing replacements or fixing misspelled words, and edit_refresh()
is called to highlight the relevant word, then the current menu can be
anything from MREPLACEWITH, MYESNO, MSPELL, or MMAIN. Make sure it is
always set to the latter just before calling edit_refresh(), so that
display_string() will use the full length and the word gets properly
highlighted.
This fixes https://savannah.gnu.org/bugs/?55680.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
Bug was introduced by the previous commit, 56181896.
All tested systems (FreeBSD, NetBSD, OpenBSD, Alpine, and Ubuntu)
support the GNU-style word boundaries (\< and \>), either natively
or through using the regex module from gnulib.
If this change breaks regexes containing \< or \> on your system,
please report a bug: https://savannah.gnu.org/bugs/?group=nano
This addresses https://savannah.gnu.org/bugs/?55207.
When something is spotlighted, it should survive a refresh of
the screen and an excursion to a help text, so the spotlight
should get painted whenever the edit window is drawn.
This fully fixes https://savannah.gnu.org/bugs/?54721.
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 the keyboard buffer is empty, return a value that is not equivalent
to <Ctrl+Space>, so that typing a bunch of these while searching is going
on will not result in some of them getting executed afterward.
When doing for example: ^W xx ^R ^C ^W, the "xx" would again be shown
after the prompt. This is wrong -- when starting a new search, the
current answer should be empty.
Reported-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
Instead of weaving back and forth between do_search()/do_replace() and
search_init() every time that one of the options is toggled, just keep
looping in the latter function until the user presses <Enter>.
The weaving for the do_gotolinecolumn() function remains, but is
shortened to involve only search_init().
When we're just searching, we do want to report the occurrence at
the cursor (after coming full circle) as a match, so that we can
mention that this is the only occurrence. When replacing, we do
not want to replace this match twice.
This fixes https://savannah.gnu.org/bugs/?52888.
Each leading tab is converted to two tabs, and any leading four spaces
is converted to one tab. The intended tab size (for keeping most lines
within 80 columns) is now four.
The pointer not being NULL is enough indication that the mark is set.
Also, rename the pointer from 'mark_begin' to simply 'mark', since
the former is kind of pleonastic.
When there are no help lines, there won't be any call to update the
actual contents of the bottom window, so... do it immediately after
blanking the row.
This fixes https://savannah.gnu.org/bugs/?52377.