aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-14 07:21:45 +0800
committerGitHub <noreply@github.com>2025-02-13 23:21:45 +0000
commit9f85dace94d2682f076ede824d3516cdf779ff7b (patch)
treec68afb77088206a0229731aa1feae600d80c1774 /src/nvim/normal.c
parent93480f7fbaa5b4e5418d95dd35005daa6142dbb9 (diff)
downloadrneovim-9f85dace94d2682f076ede824d3516cdf779ff7b.tar.gz
rneovim-9f85dace94d2682f076ede824d3516cdf779ff7b.tar.bz2
rneovim-9f85dace94d2682f076ede824d3516cdf779ff7b.zip
vim-patch:9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol" (#32434)
Problem: 'smoothscroll' gets stuck with 'listchars' "eol". Solution: Count size of 'listchars' "eol" in line size when scrolling. (zeertzjq) related: neovim/neovim#32405 closes: vim/vim#16627 https://github.com/vim/vim/commit/2c47ab8fcd7188fa87053c757ea86b0d846c06c1
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 7d0080622d..0cd60c7dc7 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -5225,7 +5225,7 @@ void nv_g_home_m_cmd(cmdarg_T *cap)
// When ending up below 'smoothscroll' marker, move just beyond it so
// that skipcol is not adjusted later.
if (curwin->w_skipcol > 0 && curwin->w_cursor.lnum == curwin->w_topline) {
- int overlap = sms_marker_overlap(curwin, -1);
+ int overlap = sms_marker_overlap(curwin, curwin->w_width_inner - width2);
if (overlap > 0 && i == curwin->w_skipcol) {
i += overlap;
}