- 05 May, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Also remove the item about one Replacement Character per invalid UTF-8 sequence, because how many bytes form a sequence? Two? Three? Four? Better just put one Replacement Character per invalid byte, like is done now.
-
- 04 May, 2016 7 commits
-
-
Benno Schulenberg authored
When fixing a misspelling and not answering 'All' (but 'Yes' or 'No'), the chance is quite substantial that one will type y or n at the end of the next word. Diminish this chance by showing for a moment a message on the statusbar.
-
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
-
Benno Schulenberg authored
-
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.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
For some reason the keyboard code seems to assume that all integers waiting in the keybuffer form a single sequence. But this isn't the case: when there is an escape (0x1b) among them, then that is where a new sequence starts. So, prevent the input code from considering an escape after a non-escape as part of the current sequence. This fixes https://savannah.gnu.org/bugs/?47839.
-
- 03 May, 2016 2 commits
-
-
Benno Schulenberg authored
When starting to replace misspelled words, pass the actual position of the cursor instead of the position of the first found occurrence, so that the cursor position will be updated for changed lengths. This fixes https://savannah.gnu.org/bugs/?47834.
-
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 4 commits
-
-
Benno Schulenberg authored
-
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.
-
Benno Schulenberg authored
And make the function actually refresh the list. Useful for when files have been added or deleted since opening the browser.
-
Benno Schulenberg authored
Add a global variable, 'present_path', so that 'cwd_tab_completion()' knows where the user is in the browser, so that it can try completions against names in that directory instead of always against names in the current working directory (where nano was invoked). This fixes https://savannah.gnu.org/bugs/?47234 . Signed-off-by:
Rishabh Dave <rishabhddave@gmail.com> Signed-off-by:
Benno Schulenberg <bensberg@justemail.net>
-
- 01 May, 2016 5 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
It is misleading to say "Unknown Command" when there is no way to rebind the relevant key stroke do anything useful.
-
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.
-
- 29 Apr, 2016 2 commits
-
-
Benno Schulenberg authored
Simply move to the next filename first before starting to match.
-
Benno Schulenberg authored
Don't skip the end of the function: use break instead of return.
-
- 27 Apr, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Included files are meant to contain only syntax definitions; they may not set or unset options, nor rebind keys, nor include other files. This fixes https://savannah.gnu.org/bugs/?47391.
-
- 26 Apr, 2016 2 commits
-
-
Benno Schulenberg authored
This restores things to the way they were before commit 36ec76a5. Apparently all those refreshes are needed in some cases after all.
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?47786.
-
- 25 Apr, 2016 4 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.
-
Benno Schulenberg authored
Since commit 41ed6907, cancelling a prompt after tabbing would sometimes leave the list of file names on the screen. When testing this first, it worked fine -- I was fooled again by 'edit_refresh_needed' already being TRUE when nano has just started up and sits waiting for the first key stroke. I have to hunt this down and kill it.
-
Benno Schulenberg authored
Since commit dac0aa1d, nano would leave edittop at current after reading data from standard input, meaning that everything that had been read in was invisible, "scrolled off" the top of the screen. Correct this by explicitly setting edittop. The above does not happen for ^R (^X) because it has a special mechanism to save and restore edittop. Nor does it happen for ^R ^X M-F because it sets current to the top of the file and refreshing the screen will make edittop follow, or -- in case just one unterminated line was read in -- edittop will already be equal to current.
-
- 24 Apr, 2016 4 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Names could be strings of multibyte characters, so they could be more than COLS - 1 bytes long and still be less than COLS - 1 columns wide.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Also unwrap or improve some comments.
-
- 23 Apr, 2016 6 commits
-
-
Benno Schulenberg authored
A normal lock file is apparently 1024 bytes in size, so the second attempt at reading bytes from the file would try to read 8192 more bytes into a buffer that has room for only 7168 left. According to valgrind, the read() function doesn't like that -- and true: if for some reason the lock file had suddenly expanded, the buffer would overflow. This fixes https://savannah.gnu.org/bugs/?47156.
-
Benno Schulenberg authored
When a tilde is used in the name given at the ^R or ^O prompts, nano expands it, but /not/ when a tilde is given on the command line (in such a way that the shell leaves it as is). Correct that asymmetry. This fixes https://savannah.gnu.org/bugs/?44929 and fixes https://savannah.gnu.org/bugs/?47702 and fixes https://savannah.gnu.org/bugs/?47771.
-
Benno Schulenberg authored
Commit 36ec76a5 made the wrong change: after a tab that did not list any file names on the screen, a refresh /is/ needed, because a previous tab might have listed things on the screen. But at the end of the prompt, it is not necessary to refresh the edit window if things were listed, because the window will be refreshed anyway after reading in a file.
-
Benno Schulenberg authored
Use 'slash' to point at a possible slash, use 'filename' just to point at the real file name, and use 'wasdirname' just to point at the dir's name before expanding it in order to be able to free it. Also, remove two superfluous asserts: 'dirname' cannot be NULL because it has just been mallocstrcpy'd, and checking 'num_matches' is pointless as it would crash on the next statement anyway.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-