Commit 255f5478 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

startup: in default mode, display the tail of the file as Pico does

When not using --smooth (nor 'set smooth'), and a line near or beyond
the end-of-file is addressed with the + command-line argument, then
center the cursor, just like Pico does -- so in the default mode,
nano is again more like Pico.

This partially addresses https://savannah.gnu.org/bugs/?51489.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -912,7 +912,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
/* If the target line is close to the tail of the file, put the last
* line or chunk on the bottom line of the screen; otherwise, just
* center the target line. */
if (rows_from_tail < editwinrows / 2) {
if (rows_from_tail < editwinrows / 2 && ISSET(SMOOTH_SCROLL)) {
openfile->current_y = editwinrows - 1 - rows_from_tail;
adjust_viewport(STATIONARY);
} else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment