Hi list! How to reproduce: - start vim $ vim -N -u NONE -c "se nu"
- Input below. ia<Esc> :call winrestview({'topline': -3}) Expected behavior: - Display this. (Display does not change) 1 a Actual behavior: - Displayed below. (Invalid line number!) -3 a -2 a -1 a 0 a 1 a I attached a patch. Please check this. -- Best regards, Hirohito Higashi -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
diff -r 47b1887483da src/eval.c --- a/src/eval.c Fri Sep 19 22:38:48 2014 +0200 +++ b/src/eval.c Tue Sep 23 23:21:47 2014 +0900 @@ -19576,7 +19576,7 @@ # endif changed_window_setting(); - if (curwin->w_topline == 0) + if (curwin->w_topline <= 0) curwin->w_topline = 1; if (curwin->w_topline > curbuf->b_ml.ml_line_count) curwin->w_topline = curbuf->b_ml.ml_line_count;