1
0
forked from aniani/vim

patch 9.0.0482: "g0" moves to wrong location with virtual text "above"

Problem:    "g0" moves to wrong location with virtual text "above".
Solution:   Compensate for the extra columns. (closes #11141)  Also fix "g$"
This commit is contained in:
Bram Moolenaar
2022-09-16 20:51:14 +01:00
parent 8fa745e7be
commit e24b4aba1f
7 changed files with 74 additions and 28 deletions

View File

@@ -470,19 +470,29 @@ check_top_offset(void)
return FALSE;
}
/*
* Update w_curswant.
*/
void
update_curswant_force(void)
{
validate_virtcol();
curwin->w_curswant = curwin->w_virtcol
#ifdef FEAT_PROP_POPUP
- curwin->w_virtcol_first_char
#endif
;
curwin->w_set_curswant = FALSE;
}
/*
* Update w_curswant if w_set_curswant is set.
*/
void
update_curswant(void)
{
if (curwin->w_set_curswant)
{
validate_virtcol();
curwin->w_curswant = curwin->w_virtcol
#ifdef FEAT_PROP_POPUP
- curwin->w_virtcol_first_char
#endif
;
curwin->w_set_curswant = FALSE;
}
update_curswant_force();
}
/*