- 25 Apr, 2017 1 commit
-
-
Rishabh Dave authored
Allow the user to search in a help text with ^W and M-W. Achieve this by not writing the help text directly to the screen but first writing it to a temporary file and then opening this file in a new buffer, and treating it specially: the normal file-reading feedback is suppressed, the titlebar shows the headline of the text, the cursor is hidden, and the menu is limited to just the up and down movements and searching. This fulfills https://savannah.gnu.org/bugs/?28994 . Signed-off-by:
Rishabh Dave <rishabhddave@gmail.com>
-
- 19 Apr, 2017 3 commits
-
-
Benno Schulenberg authored
Call something a buffer when it refers to a linked list of linestructs, and call something a linestruct when it is a struct that describes a single line.
-
Benno Schulenberg authored
Trim a superfluous assert too.
-
Benno Schulenberg authored
File formats, appending and prepending, and backups are not available when --enable-tiny is used, so prevent all relevant pieces of code from getting compiled. And correct two misspelled ENABLE_TINY to NANO_TINY.
-
- 17 Apr, 2017 1 commit
-
-
Benno Schulenberg authored
Because nothing gets reset to zero or to some initial value.
-
- 09 Apr, 2017 1 commit
-
-
Benno Schulenberg authored
The interval 2013-2017 for the Free Software Foundation is valid because in those years there were releases with changes by either Chris or David, and the GNU maintainers guide advises to mention a new year in all files of a package, not just in the ones that actually changed, and be done with it for the rest of the year.
-
- 04 Apr, 2017 4 commits
-
-
Benno Schulenberg authored
Verify at startup that the number is not too small.
-
Benno Schulenberg authored
(We still leak the backupname in that case, but I can't be bothered with that now.) Also elide a variable, trim some comments, and rewrap some lines.
-
Benno Schulenberg authored
-
Kamil Dudka authored
Use futimens() instead of utime() to change the timestamps on a backup file. Otherwise, a non-privileged user could create an arbitrary symlink with the name of the backup file and in this way fool a privileged user to call utime() on the attacker-chosen file. Import the relevant gnulib module to make sure futimens() is available.
-
- 24 Mar, 2017 1 commit
-
-
Benno Schulenberg authored
The "./" is a shorthand for "current working directory". It is better to specify it, because it differs from what Pico does: reading always from the user's home directory no matter where the editor was started.
-
- 23 Mar, 2017 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Only use the "from" thing when an operating directory is in effect, because /only/ then the indicated directory can be something other than "./". Also, make it so that there is no space before the colon.
-
- 22 Mar, 2017 3 commits
-
-
David Lawrence Ramsey authored
We want to be able to scroll the line at edittop partially off the screen. For this to be possible, the new variable firstcolumn stores the starting column of the viewport -- the starting column in the line that edittop points to. Since firstcolumn is used by go_back_chunks() and go_forward_chunks(), it can't be completely #ifdefed out when NANO_TINY is set, but outside of softwrap mode it should always be zero. Currently firstcolumn is initialized to zero, reset to zero when toggling softwrap mode off, and reset to zero when switching buffers while softwrap mode is off. It's otherwise unused, but its uses are forthcoming.
-
David Lawrence Ramsey authored
Since all lines can be partially scrolled off the screen now (except for the top line of the edit window, which is forthcoming), ensure_line_is_visible() is no longer needed.
-
David Lawrence Ramsey authored
Use less_than_a_screenful() again, just as in do_uncut_text().
-
- 20 Mar, 2017 1 commit
-
-
Benno Schulenberg authored
Most of these variables are freed moments later -- reallocating them is thus a waste of time.
-
- 06 Mar, 2017 1 commit
-
-
Mike Frysinger authored
Windows doesn't have *nix style account databases.
-
- 28 Feb, 2017 3 commits
-
-
David Lawrence Ramsey authored
With read_file() revamped, it now uses partition_filestruct() indirectly via ingraft_buffer(), so we can't use partition_filestruct() to replace marked text in the alternate spell checker anymore without segfaulting. Add the new function replace_marked_buffer() to accomplish this instead. Based on replace_buffer(), it uses extract_buffer() to throw away the marked un-spell-checked text, and then uses read_file() to insert the spell-checked text at the position where the mark was. Accordingly, remove unneeded partitioning and related stuff from do_alt_speller(). Besides pasting the file into the buffer at current[current_x], ingraft_buffer() also deals with renumbering, updating totsize, and handling a magicline, so do_alt_speller() doesn't need to do those anymore.
-
David Lawrence Ramsey authored
With read_file() revamped to handle inserting a file at the current position, partitioning the buffer is no longer needed.
-
David Lawrence Ramsey authored
Move buffer handling and '\r' stripping from read_line() to read_file(), so that the file gets its format determined and gets stored in its own buffer entirely in one function. Then use ingraft_buffer() to insert this new buffer into the current one. In addition to pasting the file at current[current_x], ingraft_buffer() also deals with renumbering, the updating of totsize, and the handling of a magicline, so read_file() doesn't need to do those anymore. Note that all this makes read_file() depend on the position of current[current_x] to know where to insert the file. Accordingly, set current_x to zero in initialize_buffer_text() instead of in make_new_buffer(), so that replace_buffer() keeps working properly.
-
- 24 Feb, 2017 1 commit
-
-
Benno Schulenberg authored
-
- 17 Feb, 2017 2 commits
-
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
-
- 19 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?49892.
-
- 09 Jan, 2017 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 06 Jan, 2017 2 commits
-
-
David Lawrence Ramsey authored
This fixes https://savannah.gnu.org/bugs/?49994 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
David Lawrence Ramsey authored
Instead of setting openfile->current_y (and wrongly so), just call reset_cursor() to recompute current_y and place the cursor on that line (if it is not offscreen).
-
- 03 Jan, 2017 1 commit
-
-
Benno Schulenberg authored
The conditionalizing saved negligible amounts of space, of memory, and of speed.
-
- 01 Jan, 2017 2 commits
-
-
Benno Schulenberg authored
This makes nano's cursor behavior consistent across 1) typing text by hand; 2) pasting in text with ^U; 3) inserting text from a file; and 4) redoing with M-E that same typing or pasting or inserting. This fixes https://savannah.gnu.org/bugs/?49968.
-
Benno Schulenberg authored
-
- 28 Dec, 2016 1 commit
-
-
Benno Schulenberg authored
The warning is wrong when the user has just saved a buffer under a new name. And when --quickblank is used, the warning most likely gets cleared off before it is seen, and the user would just hear the beep and be left wondering what happened. This avoids https://savannah.gnu.org/bugs/?49875.
-
- 26 Dec, 2016 3 commits
-
-
Benno Schulenberg authored
When a given file is, for example, unreadable or unwritable, the error message should use ^J instead of ^@ in its name.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 23 Dec, 2016 4 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.
-
Benno Schulenberg authored
Decode 0x0A bytes to 0x00 when saving the search history, and encode them again when reading the file back in, to prevent nano from hanging or aborting when encountering 0x00 on a line by itself.
-
Benno Schulenberg authored
After updating the color palette, the corresponding new window content should be drawn immediately, before some other part of the code calls doupdate(), to prevent the old content being shown in the new colors. This fixes https://savannah.gnu.org/bugs/?49912 . Reported-by:
Mike Frysinger <vapier@gentoo.org>
-