- 06 May, 2016 1 commit
-
-
Benno Schulenberg authored
Cancelling a search should restore waiting mode for the keyboard, just like at the other exit points of the search routine. And when the input routine has read in multiple keystrokes, it should not blindly switch back to waiting mode, but only when that mode was on before. This fixes the second half of https://savannah.gnu.org/bugs/?47438.
-
- 04 May, 2016 2 commits
-
-
Benno Schulenberg authored
Partitioning the file makes the undo system lose track, so that undoing things has a good chance of losing data. Instead, just make sure that the region is marked "backwards", with current at the top and the mark at the bottom, and then let the replace loop take care of not going outside of the marked region. This also has the effect that if the marked region fits entirely on the screen, or all the misspellings are onscreen, then the screen will not be scrolled at all. Which makes for a smooth experience. This fixes https://savannah.gnu.org/bugs/?47836, and fixes https://savannah.gnu.org/bugs/?45573.
-
Benno Schulenberg authored
Since nano-2.4.1, reading in or pasting a large piece of text would put the cursor on the bottom line, leaving only one line of the non-read or non-pasted text visible. This is different from the centering behavior of Pico, and somewhat disorienting, as you can't see "where you are" any more in relation to the file as it was. So now center the cursor whenever the read or pasted text is larger than the screen, but don't center it when the text fits entirely on the screen. (The latter avoids the effect of the screen jumping unnecessarily when inserting just a few lines while the cursor is near the bottom.) To achieve this behavior: default to focusing, and temporarily set it to FALSE when the focusing effect is unwanted. This fixes https://savannah.gnu.org/bugs/?47841.
-
- 03 May, 2016 1 commit
-
-
Benno Schulenberg authored
When verifying that a match is a separate word (during spell checking), instead of first copying out the word, then passing the word, and then measuring its length, just pass its length straigtaway.
-
- 02 May, 2016 1 commit
-
-
Benno Schulenberg authored
When we're spell checking, we don't need a special mechanism to detect we have come full circle: reaching the end-of-buffer means we're done. So don't bother to reset came_full_circle when we're spell checking (when begin == NULL) but simply ignore its value.
-
- 01 May, 2016 3 commits
-
-
Benno Schulenberg authored
The internal spell checker starts searching/replacing always at the top of the buffer, so reaching the end of the buffer means we're done with the current search/replace. This prevents the "Search Wrapped" message from flashing over the statusbar at the end of a spelling replacement.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Commit 8704dde8 mistakenly removed this part of code -- it is not dead, it is just that it will only fire when the user answered No at some of the replacement prompts. So... when we've rereached the starting line, a found occurrence is invalid when it is beyond the starting x (either after or before it, dependending on the direction of search). This fixes https://savannah.gnu.org/bugs/?47816.
-
- 25 Apr, 2016 2 commits
-
-
Benno Schulenberg authored
For a little contrast with the function edit_refresh() -- it's annoying that when you search for the latter you get to see all the settings of the flag too.
-
Benno Schulenberg authored
The function edit_update() is called by edit_refresh() itself, so it is silly that the first sets 'edit_refresh_needed' to TRUE. This setting is needed only in a few cases -- in the others it's not needed because the screen does not need to be refreshed (it was just about positioning the cursor), or 'edit_refresh_needed' has already been set by a call to goto_line_posx(). So, just set the flag in the five places that need it and spare the other four calls.
-
- 16 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 11 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
Instead of saving the current value of placewewant, then setting the new value, and then passing the old value to edit_redraw() in seven different places, just let edit_redraw() do this saving and setting. In the bargain placewewant is now only recalculated when it matters -- when allow_update is TRUE -- and not when it's superfluous.
-
- 10 Apr, 2016 2 commits
-
-
Benno Schulenberg authored
Now that findnextstr() no longer sets placewewant, we can can make a copy of the old value just where needed: when a bracket is found.
-
Benno Schulenberg authored
In the innermost search loop, don't set placewewant, because this loop is also used for replacing and spell fixing, when we don't really want to be there: we are just passing through. Not setting placewewant means we don't need to save and restore it in those passing-through routines. The value of placewewant is only relevant when doing cursor movement, which doesn't happen during replacing nor spell checking, so there is no need to keep placewewant up to date -- it is set when it matters: at the end of go_looking().
-
- 08 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
Stop keeping track of the vertical screen position when searching for something. If nothing is found, current_y doesn't change, and all the incrementing/decrementing was a waste of time. If something is found and it is onscreen, it is easy to calculate the new current_y. And if something is found and it is offscreen, then current_y is irrelevant, because we will be either centering the found occurrence (searching) or putting it on the top or bottom line (bracket matching). (The above does not take softwrapping into account, but neither did the old code, so this doesn't introduce any new bugs.) (Also, when the search wraps, and the viewport is away from head or tail of the file, and the found occurrence is within the viewport, then the incremented/decremented current_y would be way wrong, but this didn't have any adverse effects as far as I could tell. It seems that current_y is irrelevant in most cases.)
-
- 07 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
Add a third mode of scrolling, FLOWING, besides CENTERING and STATIONARY. This is used for word and paragraph jumping (and for bracket matching, but that worked correctly already), and only when focusing is FALSE. The new mode prevents the screen from scrolling too many lines when there are several blank lines at the bottom of the edit window and the next word or paragraph is out of view. This fixes https://savannah.gnu.org/bugs/?47194.
-
- 05 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 04 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
SVN revision 5748 could cause some 'else's to be orphaned. This fixes https://savannah.gnu.org/bugs/?47610 . Reported-by:
Thomas Rosenau <thomasr@fantasymail.de> Signed-off-by:
Benno Schulenberg <bensberg@justemail.net>
-
- 30 Mar, 2016 2 commits
-
-
Benno Schulenberg authored
for aptness, for contrast. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
that is taking too long. This fixes Savannah bug #47439. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 29 Mar, 2016 1 commit
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 28 Mar, 2016 2 commits
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 23 Mar, 2016 3 commits
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
a misspelled word twice. And deleting the piece of dead code that was meant to do this. This fixes Savannah bug #47188. When we've reached again the same line where we started and we find an instance there, then this can only be /before or at/ the position from where we started, otherwise we would have found it when we commenced searching. And so... that little piece of dead code does absolutely nothing -- it will never fire. It's so nice... nano is full of Easter Eggs! :) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 22 Mar, 2016 1 commit
-
-
Benno Schulenberg authored
using it when it's available (which it is on OS X systems). This completes the fix for Savannah bug #47325. Patch by Thomas Rosenau. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5759 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 20 Mar, 2016 4 commits
-
-
Benno Schulenberg authored
into the new function go_looking(). git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5756 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
been set to 'answer' in search_init() when 'answer' isn't empty, and when 'answer' /is/ empty we use 'last_search' anyway. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
This fixes Savannah bug #47205. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 19 Mar, 2016 6 commits
-
-
Benno Schulenberg authored
and the next time a Search or Replace is run, this answer is overwritten with an empty string. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5748 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
return with -2 when answer is empty, so when answer is empty i cannot be zero. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5747 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
as do_prompt() can handle a NULL. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
This fixes Savannah bug #47440. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5742 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 17 Mar, 2016 3 commits
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5741 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-