summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-08-29 14:20:51 +0200
committerBram Moolenaar <Bram@vim.org>2014-08-29 14:20:51 +0200
commit773b158de8f813b0683fc56e37639937e5c9c1ee (patch)
treeff13a9c74f250e04676c428b18175db4cee5549c
parentd7408fa0ceb7bf414ca5c17f8ae3bc13131b7b15 (diff)
downloadvim-git-773b158de8f813b0683fc56e37639937e5c9c1ee.tar.gz
updated for version 7.4.425v7.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)
-rw-r--r--src/normal.c8
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c
index fc9e94480..7479ac789 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4509,13 +4509,19 @@ nv_screengo(oap, dir, dist)
#if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
{
+ colnr_T virtcol;
+
/*
* Check for landing on a character that got split at the end of the
* last line. We want to advance a screenline, not end up in the same
* screenline or move two screenlines.
*/
validate_virtcol();
- if (curwin->w_virtcol > curwin->w_curswant
+ 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/version.c b/src/version.c
index a3e113961..32a6b3bd0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 425,
+/**/
424,
/**/
423,