- 10 Feb, 2017 1 commit
-
-
Benno Schulenberg authored
Just like when spell-checking, there is no need to wrap around when doing replacements in a region, because a region cannot straddle the buffer's edges. This is the proper fix for https://savannah.gnu.org/bugs/?50158, and fixes https://savannah.gnu.org/bugs/?50273.
-
- 26 Jan, 2017 5 commits
-
-
Benno Schulenberg authored
After the changes to the search routine, it is no longer necessary to take one step back before starting a replacement session. This fixes https://savannah.gnu.org/bugs/?50147.
-
Benno Schulenberg authored
Even when a match falls within the marked region, this does not mean that it is a true match when already the whole file has been searched, because then this is the second time we find this match. This fixes https://savannah.gnu.org/bugs/?50158.
-
Benno Schulenberg authored
The spell fixer does not provide a beginning line, so the search routine should then not try to refer to any data of this line. Also, since the changes to the search routine there is no need any more to retreat one step before starting to search for a misspelled word. This fixes https://savannah.gnu.org/bugs/?50159.
-
Benno Schulenberg authored
When the user answered No to a replacement prompt, skip the match at the current position, so we don't stay stuck there. Also, when replacing in the backward direction, or the match is of length zero, skip the match at the current position, to not get stuck. This fixes https://savannah.gnu.org/bugs/?50126 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com> This also fixes https://savannah.gnu.org/bugs/?50137, and refixes https://savannah.gnu.org/bugs/?48635, and fixes https://savannah.gnu.org/bugs/?50144.
-
Benno Schulenberg authored
That is: remove the special treatment of BOW anchors, and instead make regexes match against the whole line instead of against an artificially shortened one, because the latter method creates ghost matches: matches at the starting point of the search that aren't really matches when seen in the context of the whole line. This fixes https://savannah.gnu.org/bugs/?50030.
-
- 25 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
When the tail of a match falls outside of the marked region, it is in fact not a match and should not be replaced. This fixes https://savannah.gnu.org/bugs/?50136.
-
- 24 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
When a replacement happens right at where the cursor sits, the position of the cursor should not be adjusted, because the real cursor position is between the current character and the preceding one: the place where the cursor is shown is in fact right /after/ the insertion point. This fixes https://savannah.gnu.org/bugs/?50134, and fixes https://savannah.gnu.org/bugs/?50135.
-
- 19 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?50028.
-
- 17 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
A search should start at the place of the cursor, not one step beyond, so that the non-word boundary between the current character and the next will be found. Starting one step beyond the current character, as was done until now, would find the non-word boundary between the next and the overnext character as the first one.
-
- 06 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
-
- 05 Jan, 2017 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
The search routine begins searching right after the cursor and behaves as if the line starts there, which means that a beginning-of-word anchor (\< or \b) will match there also when in fact the cursor is sitting in the middle of a word. To prevent finding a false match, verify that for a regex that starts with a BOW anchor the found match is actually the start of a word. This fixes https://savannah.gnu.org/bugs/?45630.
-
Benno Schulenberg authored
-
- 03 Jan, 2017 3 commits
-
-
Benno Schulenberg authored
The conditionalizing saved negligible amounts of space, of memory, and of speed.
-
Benno Schulenberg authored
In that case setting the latter to TRUE is misleading. So don't do that.
-
Benno Schulenberg authored
-
- 02 Jan, 2017 1 commit
-
-
David Lawrence Ramsey authored
Many of the adjustments of the value of openfile->current_y appear to be a holdover from the days when certain functions had to account for what is now called STATIONARY scrolling mode, which depends on the value of current_y. Remove these adjustement where they are superfluous. do_para_begin(), do_para_end(), and do_bracket_match() update the screen through edit_redraw(), which uses either CENTERING or FLOWING scrolling mode, so their setting of current_y is redundant and useless, as it will be ignored and then overridden by the next call to reset_cursor(). findnextstr() is called by go_looking() [which calls edit_redraw(), see above], and by do_replace_loop() and do_int_spell_fix(), which both call edit_refresh(), which in this case only uses CENTERING scrolling mode since focusing is TRUE. (Additionally, the adjustments of current_y in findnextstr() and do_bracket_match() use incorrect values when in softwrap mode.) find_paragraph() doesn't need to save or restore current_y, because it doesn't do any screen updates. do_justify() calls edit_refresh() with focusing set to TRUE, so it uses the CENTERING scrolling mode. do_alt_speller() and do_formatter() do not need to save and restore current_y, because they don't modify it in any way. This addresses https://savannah.gnu.org/patch/?9197.
-
- 23 Dec, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
In path names and file names, 0x0A means an embedded newline and should be shown as ^J, but in anything related to the file's data, 0x0A is an encoded NUL and should be displayed as ^@. So... switch mode at the two main entry points into the "file system" (reading in a file, and writing out a file), and also when drawing the titlebar. Switch back to the default mode in the main loop. This fixes https://savannah.gnu.org/bugs/?49893.
-
- 22 Dec, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 04 Dec, 2016 1 commit
-
-
Benno Schulenberg authored
At the very beginning of do_replace(), nothing has been changed or initialized yet, so there is nothing to refresh or clean up.
-
- 03 Dec, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 02 Dec, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 23 Oct, 2016 2 commits
-
-
Benno Schulenberg authored
This make tiny nano slightly less tiny, but makes the code more readable.
-
Benno Schulenberg authored
It does not update anything -- it just picks a new point from where to start displaying the buffer. All actual updating of the screen is done by edit_refresh() and edit_redraw() and such.
-
- 10 Oct, 2016 1 commit
-
-
Benno Schulenberg authored
This avoids https://savannah.gnu.org/bugs/?49298.
-
- 13 Sep, 2016 1 commit
-
-
Benno Schulenberg authored
And also case-sensitive searches, backward searches, and searching again.
-
- 29 Aug, 2016 2 commits
-
-
Benno Schulenberg authored
Mentioning "GNU nano" instead of "This program" and referring to the website instead of to a postal address.
-
Benno Schulenberg authored
-
- 26 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 07 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 27 Jul, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?48635.
-
- 24 Jun, 2016 2 commits
-
-
Benno Schulenberg authored
The negatives are taken to mean: from the end of the file, and: from the end of the line. This fulfills https://savannah.gnu.org/bugs/?48248.
-
Benno Schulenberg authored
-
- 21 Jun, 2016 2 commits
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?48282.
-
Benno Schulenberg authored
Don't make it the responsibility of the executed functions to restore the list of shortcuts of the edit window. Just detect whether another menu was displayed, and if so, redisplay the main menu.
-
- 20 Jun, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 02 Jun, 2016 1 commit
-
-
Benno Schulenberg authored
-