aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorFelipe Morales <hel.sheep@gmail.com>2014-11-21 13:21:35 -0300
committerFelipe Morales <hel.sheep@gmail.com>2014-11-27 19:40:51 -0300
commitc82eb31a5d22353b3a31e247448a44b19a590c05 (patch)
treef3310e8a198b01331b6c08c668172baa3557c1ba /src/nvim/charset.c
parent42dc00b767333576b97280a69d924afbb4326155 (diff)
downloadrneovim-c82eb31a5d22353b3a31e247448a44b19a590c05.tar.gz
rneovim-c82eb31a5d22353b3a31e247448a44b19a590c05.tar.bz2
rneovim-c82eb31a5d22353b3a31e247448a44b19a590c05.zip
vim-patch:7.4.473
vim-patch:7.4.473 Problem: Cursor movement is incorrect when there is a number column/sign/fold column and 'sbr' is displayed. Solution: Adjust the column for 'sbr'. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-473
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index f3bb3d8c73..3e37cbdafd 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1058,6 +1058,8 @@ 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 (*p_sbr != NUL && col >= (colnr_T)STRLEN(p_sbr))
+ col -= (colnr_T)STRLEN(p_sbr);
if (numberextra > 0) {
col = col % numberextra;
}