- 09 Jan, 2017 1 commit
-
-
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.
-
- 09 Dec, 2016 2 commits
-
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
Like do_down() does already, do_pageup() and do_right() should use editwincols instead of COLS. This addresses https://savannah.gnu.org/bugs/?49796.
-
- 28 Oct, 2016 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?49467.
-
- 27 Oct, 2016 1 commit
-
-
Benno Schulenberg authored
Also, don't bother conditionalizing two booleans for the tiny version.
-
- 23 Oct, 2016 1 commit
-
-
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.
-
- 20 Oct, 2016 1 commit
-
-
Faissal Bensefia authored
It can be activated with --linenumbers on the command line or with 'set linenumbers' in a nanorc file, and it can be toggled with M-#. Signed-off-by:
Faissal Bensefia <faissaloo@gmail.com> Signed-off-by:
Benno Schulenberg <bensberg@justemail.net>
-
- 18 Oct, 2016 2 commits
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?49099, and fixes the unreported corresponding bugs for <End> and <Del> and typing extra characters.
-
Benno Schulenberg authored
So the softwrap code in do_down() can compute the correct amount to scroll. This fixes https://savannah.gnu.org/bugs/?49374.
-
- 15 Oct, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 12 Oct, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 20 Sep, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 14 Sep, 2016 2 commits
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?49086.
-
Benno Schulenberg authored
-
- 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
-
- 21 Aug, 2016 2 commits
-
-
Benno Schulenberg authored
Even when the edit window consists of just one or two lines, the PageUp and PageDown functions (^Y and ^V) should continue to move the window. This fixes https://savannah.gnu.org/bugs/?48805.
-
Benno Schulenberg authored
-
- 01 Aug, 2016 4 commits
-
-
Benno Schulenberg authored
When doing an <Up> on the top line, or a <Down> on the bottom line of the edit window, the affected lines have already been redrawn by the scrolling code, so there is no need to do that again. (However, that does not prevent the second line (or the last-but-one line) from being redrawn unnecessarily when using the M-- (or M-+) command elsewhere on the screen and /that/ line is horizontally scrolled. But we'll let that pass for now.)
-
Benno Schulenberg authored
-
Benno Schulenberg authored
For horizontal scrolling, it is not the /desired/ column position that is relevant for determining whether a line needs to be redrawn after a cursor movement, but the /actual/ column positions before and after. This fixes https://savannah.gnu.org/bugs/?48627, and fixes https://savannah.gnu.org/bugs/?48629.
-
Benno Schulenberg authored
Having two unneeded parameters in the tiny version is acceptable -- the code gets so much more readable.
-
- 28 Jul, 2016 1 commit
-
-
Benno Schulenberg authored
It is nicer to have a predictable cursor position and not see it hop left and right on differently indented lines.
-
- 24 Jul, 2016 1 commit
-
-
Benno Schulenberg authored
And hard-bind the keys Ctrl+Up and Ctrl+Down to these functions. Unlike the paragraph-jumping code, these new functions disregard any indentation, treating only blank lines as separators. They also do an automatic smart home when that option is set. This fulfills https://savannah.gnu.org/bugs/?48291.
-
- 27 May, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 04 May, 2016 1 commit
-
-
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.
-
- 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.
-
- 15 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
The number of lines to scroll is: the y position of the start of the current line, plus the extra lines that this line occupies, plus the extra lines that the next line occupies, plus one, minus the y position of the last window line. The y position of the start of the current line is current_y - xplustabs() / COLS, the extra lines are strlenpt(data) / COLS, and the y position of the last window line is editwinrows - 1. Note that we first compute the amount to scroll before actually moving to the next line, because we need the current value of current_x, not the one that it will have in the next line. The placewewant value is not good either, because it might be beyond where we actually are. This fixes https://savannah.gnu.org/bugs/?47665.
-
- 13 Apr, 2016 3 commits
-
-
Benno Schulenberg authored
When in softwrap mode and scrolling down a line, and thus going to do a full refresh, get out and don't bother redrawing the current and prior lines first.
-
Benno Schulenberg authored
When moving the cursor up or down one line, redraw the new current line only when the target column (placewewant) is beyond the screen, or when the mark is on. (This still redraws the current and prior lines unnecessarily when they are in fact shorter than the screen is wide and the mark is off, but we'll let that pass for now.) Also, when softwrap is on, we don't have have to redraw the current and prior lines at all (when the mark is off): they are in full view, there is nothing to show or hide.
-
Benno Schulenberg authored
When scrolling down a line, a full refresh of the edit window is only needed when softwrap is on, because only then the movement is irregular. When each file line takes up just one screen line (softwrap is off), edit_scroll() is perfectly able to scroll and redraw only the necessary lines. (But... when doing a full refresh anyway with softwrap, why bother scrolling at all? Why not just adjust edittop and call refresh?)
-
- 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.
-
- 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
-
- 22 Feb, 2016 1 commit
-
-
Benno Schulenberg authored
the backward one first. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5661 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 08 Dec, 2015 1 commit
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5492 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-