mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-patch:7.4.425: Adjust virtcol when showbreak is set
vim-patch:7.4.425 Problem: When 'showbreak' is used "gj" may move to the wrong position. (Nazri Ramliy) Solution: Adjust virtcol when 'showbreak' is set. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-425
This commit is contained in:
@@ -3492,7 +3492,11 @@ static bool nv_screengo(oparg_T *oap, int dir, long dist)
|
||||
* screenline or move two screenlines.
|
||||
*/
|
||||
validate_virtcol();
|
||||
if (curwin->w_virtcol > curwin->w_curswant
|
||||
colnr_T virtcol = curwin->w_virtcol;
|
||||
if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
|
||||
virtcol -= vim_strsize(p_sbr);
|
||||
|
||||
if (virtcol > curwin->w_curswant
|
||||
&& (curwin->w_curswant < (colnr_T)width1
|
||||
? (curwin->w_curswant > (colnr_T)width1 / 2)
|
||||
: ((curwin->w_curswant - width1) % width2
|
||||
|
Reference in New Issue
Block a user