mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 9.0.1792: problem with gj/gk/gM and virtual text
Problem: Normal mode "gM", "gj", "gk" commands behave incorrectly with virtual text. Solution: Use linetabsize() instead of linetabsize_str(). closes: #12909 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
committed by
Christian Brabandt
parent
58f39d89a8
commit
d809c0a903
@@ -150,7 +150,7 @@ coladvance2(
|
||||
|
||||
if ((addspaces || finetune) && !VIsual_active)
|
||||
{
|
||||
curwin->w_curswant = linetabsize_str(line) + one_more;
|
||||
curwin->w_curswant = linetabsize(curwin, pos->lnum) + one_more;
|
||||
if (curwin->w_curswant > 0)
|
||||
--curwin->w_curswant;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ coladvance2(
|
||||
&& wcol >= (colnr_T)width
|
||||
&& width > 0)
|
||||
{
|
||||
csize = linetabsize_str(line);
|
||||
csize = linetabsize(curwin, pos->lnum);
|
||||
if (csize > 0)
|
||||
csize--;
|
||||
|
||||
|
Reference in New Issue
Block a user