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.
master
Benno Schulenberg 2017-07-18 21:15:35 +02:00
parent 2a7c9b7f62
commit 255f5478e4
1 changed files with 1 additions and 1 deletions

View File

@ -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