From 0a20cd7f50c956044ebb204349491076e5424891 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Tue, 23 Dec 2014 13:04:50 +0100 Subject: vim-patch:7.4.489 Problem: Cursor movement still wrong when 'lbr' is set and there is a number column. (Hirohito Higashi) Solution: Add correction for number column. (Hiroyuki Takagi) https://code.google.com/p/vim/source/detail?r=v7-4-489 --- src/nvim/charset.c | 3 +++ src/nvim/version.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 9e5194a5df..32427cc3ba 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1058,6 +1058,9 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he if (col >= (colnr_T)wp->w_width) { col -= wp->w_width; numberextra = wp->w_width - (numberextra - win_col_off2(wp)); + if (numberextra > 0) { + col %= numberextra; + } if (*p_sbr != NUL) { colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr); if (col >= sbrlen) diff --git a/src/nvim/version.c b/src/nvim/version.c index 81601e8d8f..c4529265cc 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -249,7 +249,7 @@ static int included_patches[] = { //492, 491, //490, - //489, + 489, //488, //487, //486, -- cgit