From a6d63591f1fc61d570b646306d7c259b5ec2cace Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Sat, 13 May 2023 02:15:01 +0200 Subject: vim-patch:9.0.1545: text not scrolled when cursor moved with "g0" and "h" (#23599) Problem: Text not scrolled when cursor moved with "g0" and "h". Solution: Adjust w_skipcol when needed. (Luuk van Baal, closes vim/vim#12387) https://github.com/vim/vim/commit/8667a5678f983ba899825b810ab849952d49bcb8 --- src/nvim/edit.c | 1 + src/nvim/normal.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/nvim') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 8fbc5fb2ab..7670d6754f 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2527,6 +2527,7 @@ int oneleft(void) } curwin->w_set_curswant = true; + adjust_skipcol(); return OK; } diff --git a/src/nvim/normal.c b/src/nvim/normal.c index fa6cdb0ad8..7e44e55a8e 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -5272,6 +5272,7 @@ static void nv_g_home_m_cmd(cmdarg_T *cap) curwin->w_valid &= ~VALID_WCOL; } curwin->w_set_curswant = true; + adjust_skipcol(); } /// "g_": to the last non-blank character in the line or lines downward. -- cgit