Patch 9.0.1000

9 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 3, 2022, 1:36:07 PM12/3/22
to vim...@googlegroups.com

Patch 9.0.1000
Problem: With 'smoothscroll' skipcol may be reset unnecessarily.
Solution: Check the line does actually fit in the window.
Files: src/move.c, src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smooth_long_9.dump


*** ../vim-9.0.0999/src/move.c 2022-12-03 11:51:48.897409320 +0000
--- src/move.c 2022-12-03 18:33:04.792799972 +0000
***************
*** 1909,1915 ****
int scrolled = FALSE;

validate_cheight();
! if (curwin->w_cline_height == curwin->w_height)
{
// the line just fits in the window, don't scroll
reset_skipcol();
--- 1909,1919 ----
int scrolled = FALSE;

validate_cheight();
! if (curwin->w_cline_height == curwin->w_height
! // w_cline_height may be capped at w_height, check there aren't
! // actually more lines.
! && plines_win(curwin, curwin->w_cursor.lnum, FALSE)
! <= curwin->w_height)
{
// the line just fits in the window, don't scroll
reset_skipcol();
*** ../vim-9.0.0999/src/testdir/test_scroll_opt.vim 2022-12-03 11:51:48.897409320 +0000
--- src/testdir/test_scroll_opt.vim 2022-12-03 18:24:20.307608933 +0000
***************
*** 481,486 ****
--- 481,493 ----
exe "normal 20h"
call s:check_col_calc(1, 4, 61)

+ " cursor on last line, "gk" should not cause a scroll
+ set scrolloff=0
+ normal G0
+ call s:check_col_calc(1, 7, 1)
+ normal gk
+ call s:check_col_calc(1, 6, 101)
+
bwipe!
endfunc

*** ../vim-9.0.0999/src/testdir/dumps/Test_smooth_long_9.dump 2022-11-19 12:24:39.762174332 +0000
--- src/testdir/dumps/Test_smooth_long_9.dump 2022-12-03 18:30:40.804572936 +0000
***************
*** 1,6 ****
! |<+0#4040ff13#ffffff0@2|o+0#0000000&|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o
! |t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o
! |f| |t|e|x|t| |w|i>t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e
|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w
! |i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h|
! @22|3|,|1|7|0| @8|6@1|%|
--- 1,6 ----
! |<+0#4040ff13#ffffff0@2|t+0#0000000&|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t
! |h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o
! |t|s| |o|f| |t|e|x>t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o
! |f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e
|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w|i|t|h| |l|o|t|s| |o|f| |t|e|x|t| |w
! |:|s|e|t| |s|c|r|o|l@1|o| @9|3|,|1|3|0| @8|6@1|%|
*** ../vim-9.0.0999/src/version.c 2022-12-03 13:52:20.465763544 +0000
--- src/version.c 2022-12-03 18:15:13.073185705 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1000,
/**/

--
hundred-and-one symptoms of being an internet addict:
221. Your wife melts your keyboard in the oven.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages