diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2014-11-21 12:39:34 -0300 |
---|---|---|
committer | Felipe Morales <hel.sheep@gmail.com> | 2014-11-27 19:40:51 -0300 |
commit | ef7eab1ec6b40afe2c88d78aaeeda65980ff6b2f (patch) | |
tree | 744bdcc2c765ccaea5dd305368a39a683f973c9a /src | |
parent | 9e37c1d3b6b9d0d35d7f7558d3efb555757278c0 (diff) | |
download | rneovim-ef7eab1ec6b40afe2c88d78aaeeda65980ff6b2f.tar.gz rneovim-ef7eab1ec6b40afe2c88d78aaeeda65980ff6b2f.tar.bz2 rneovim-ef7eab1ec6b40afe2c88d78aaeeda65980ff6b2f.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/normal.c | 6 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 29070ff188..a2bdc05831 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -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 diff --git a/src/nvim/version.c b/src/nvim/version.c index c2818edcc5..34a14ef398 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -240,7 +240,7 @@ static int included_patches[] = { //428 NA 427, //426 NA - //425, + 425, //424 NA //423, //422, |