Patch 9.0.1545

2 views
Skip to first unread message

Bram Moolenaar

unread,
May 12, 2023, 10:48:10 AM5/12/23
to vim...@googlegroups.com

Patch 9.0.1545
Problem: Text not scrolled when cursor moved with "g0" and "h".
Solution: Adjust w_skipcol when needed. (Luuk van Baal, closes #12387)
Files: src/edit.c, src/normal.c, src/testdir/test_scroll_opt.vim


*** ../vim-9.0.1544/src/edit.c 2023-03-26 21:27:21.222798864 +0100
--- src/edit.c 2023-05-12 15:44:58.060870280 +0100
***************
*** 2734,2739 ****
--- 2734,2740 ----
}

curwin->w_set_curswant = TRUE;
+ adjust_skipcol();
return OK;
}

*** ../vim-9.0.1544/src/normal.c 2023-04-26 16:50:14.161974693 +0100
--- src/normal.c 2023-05-12 15:44:58.060870280 +0100
***************
*** 5762,5767 ****
--- 5762,5768 ----
curwin->w_valid &= ~VALID_WCOL;
}
curwin->w_set_curswant = TRUE;
+ adjust_skipcol();
}

/*
*** ../vim-9.0.1544/src/testdir/test_scroll_opt.vim 2023-05-11 19:23:49.213031292 +0100
--- src/testdir/test_scroll_opt.vim 2023-05-12 15:44:58.060870280 +0100
***************
*** 419,424 ****
--- 419,436 ----
exe "normal \<C-Y>"
call s:check_col_calc(1, 3, 41)

+ " Test "g0/g<Home>"
+ exe "normal gg\<C-E>"
+ norm $gkg0
+ call s:check_col_calc(1, 2, 21)
+
+ " Test moving the cursor behind the <<< display with 'virtualedit'
+ set virtualedit=all
+ exe "normal \<C-E>"
+ norm 3lgkh
+ call s:check_col_calc(3, 2, 23)
+ set virtualedit&
+
normal gg3l
exe "normal \<C-E>"

*** ../vim-9.0.1544/src/version.c 2023-05-11 22:25:37.681434047 +0100
--- src/version.c 2023-05-12 15:46:43.048799910 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1545,
/**/

--
"Space is big. Really big. You just won't believe how vastly hugely mind-
bogglingly big it is. I mean, you may think it's a long way down the
road to the chemist, but that's just peanuts to space."
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

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