- 06 Aug, 2017 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Without them, nano still compiles for me, with everything enabled, even when using --enable-debug, --enable-utf8, and --with-slang.
-
- 23 Jul, 2017 1 commit
-
-
David Lawrence Ramsey authored
The function place_the_cursor() assumes that the viewport is up to date, i.e., that current is in range of edittop. When uncutting or inserting, however, place_the_cursor() gets called on the out-of-date viewport first, and then a screen refresh is scheduled (which would put the viewport up to date). This is backwards: the refresh should come before the cursor placement, and the only reason it works anyway is because the cap on the number of chunks to move backward papers over the problem by keeping current_y in screen range regardless. Fix this properly by simply setting current_y to the bottom row of the screen instead of calling place_the_cursor(). This value of current_y is only ever used when in smooth scrolling mode and the insertion (or paste) pushed the cursor offscreen. In other situations, this value is overridden when place_the_cursor() gets called after a screen refresh. After that fix, the cap on the number of chunks to move backward is no longer needed.
-
- 17 Jul, 2017 2 commits
-
-
Benno Schulenberg authored
Counting the added number of rows is only relevant when inserting a file into the current buffer. So don't waste time counting when it's not needed. This fixes https://savannah.gnu.org/bugs/?51479.
-
Benno Schulenberg authored
-
- 13 Jul, 2017 1 commit
-
-
Benno Schulenberg authored
The help lines need to be redrawn one step after a justification (whether it has been undone or not, to replace "Unjustify" with "Uncut" again for ^U), and after switching buffers (to update a possibly changed tag for ^T). This fixes https://savannah.gnu.org/bugs/?51455.
-
- 11 Jul, 2017 2 commits
-
-
Benno Schulenberg authored
The precalculation of the multiline regexes no longer looks at the keyboard every second, and the backup code makes use of futimens() nowadays.
-
Benno Schulenberg authored
Well, it will compile even without that include. :| I don't know why, since it does use va_list.
-
- 09 Jul, 2017 1 commit
-
-
Benno Schulenberg authored
-
- 07 Jul, 2017 1 commit
-
-
David Lawrence Ramsey authored
get_chunk_row() replaces the formula "column / editwincols". get_chunk_leftedge() replaces "(column / editwincols) * editwincols". get_last_chunk_row() replaces "strlenpt() / editwincols". get_last_chunk_leftedge() replaces "(strlenpt() / editwincols) * editwincols". This prepares us for any changes in those formulas, and for more such functions later.
-
- 02 Jul, 2017 1 commit
-
-
Benno Schulenberg authored
-
- 29 Jun, 2017 1 commit
-
-
Benno Schulenberg authored
This partially adresses https://savannah.gnu.org/bugs/?50998.
-
- 17 May, 2017 1 commit
-
-
Benno Schulenberg authored
It's useless, because the position doesn't get restored, and it cannot be restored because the name is different every time.
-
- 16 May, 2017 2 commits
-
-
Benno Schulenberg authored
This extra question was included upon Chris' request, but I find it confusing and angering.
-
Benno Schulenberg authored
-
- 11 May, 2017 1 commit
-
-
Benno Schulenberg authored
When spotlighting the string to be replaced, placewewant isn't valid, so tell place_the_cursor() to ignore its value to avoid the cursor getting mistakenly placed at the beginning of the next row. This fixes https://savannah.gnu.org/bugs/?50997 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
- 09 May, 2017 1 commit
-
-
Benno Schulenberg authored
-
- 08 May, 2017 3 commits
-
-
Benno Schulenberg authored
Also, allow Ctrl+Left/Right with --enable-tiny --enable-browser.
-
Benno Schulenberg authored
Also remove a superfluous check for 'do_replace' -- it never gets bound in the Search/Replace menus.
-
Benno Schulenberg authored
When configured with --enable-tiny --enable-multibuffer, /do/ include the new-buffer toggle in the Read-File menu.
-
- 07 May, 2017 1 commit
-
-
David Lawrence Ramsey authored
Add missing spaces, remove excess spaces, and replace groups of indentation spaces with tabs.
-
- 01 May, 2017 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Things have morphed over time and display_buffer() no longer actually displays the buffer -- it just displays the title bar, precalculates the multiline color info, and schedules a refresh of the edit window.
-
- 30 Apr, 2017 1 commit
-
-
Benno Schulenberg authored
This avoids https://savannah.gnu.org/bugs/?49912 while at the same time avoiding to draw the edit window twice in a row -- the first drawing would use a wrong margin, which results in a visible and irritating shift left or right of the content upon the second drawing. This fixes https://savannah.gnu.org/bugs/?50877.
-
- 25 Apr, 2017 2 commits
-
-
Benno Schulenberg authored
When nano has multiple files open, closing a help buffer should not switch to the next buffer in the ring but to the preceding one, because it was from there that the help screen was invoked.
-
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 1 commit
-
-
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.
-