aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2015-01-23 13:14:52 +0100
committerJustin M. Keyes <justinkz@gmail.com>2015-01-26 02:19:14 -0500
commit4ef289e761469f0b0bcfc447b4407dab78be473b (patch)
tree66807856ce13fb4b68218ae562bf6fbecd3a32d2 /src
parent51aacc2dea9858228fd387c91d7261b86f0df652 (diff)
downloadrneovim-4ef289e761469f0b0bcfc447b4407dab78be473b.tar.gz
rneovim-4ef289e761469f0b0bcfc447b4407dab78be473b.tar.bz2
rneovim-4ef289e761469f0b0bcfc447b4407dab78be473b.zip
vim-patch:7.4.517
Problem: With a wrapping line the cursor may not end up in the right place. (Nazri Ramliy) Solution: Adjust n_extra for a Tab that wraps. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-517
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c4
-rw-r--r--src/nvim/version.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 6e4c17f49e..61aa775384 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3444,6 +3444,10 @@ win_line (
1);
// TODO: is passing p for start of the line OK?
n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol, NULL) - 1;
+ if (c == TAB && n_extra + col > wp->w_width) {
+ n_extra = (int)wp->w_buffer->b_p_ts
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ }
c_extra = ' ';
if (vim_iswhite(c)) {
if (c == TAB)
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 230898bddd..b3ec87cd25 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -250,7 +250,7 @@ static int included_patches[] = {
520,
//519,
518,
- //517,
+ 517,
516,
//515,
514,