diff options
author | VVKot <volodymyr.kot.ua@gmail.com> | 2021-02-13 20:02:48 +0000 |
---|---|---|
committer | VVKot <volodymyr.kot.ua@gmail.com> | 2021-03-28 08:38:21 +0100 |
commit | 7fc58ec99a7546851d2a87b6548fd36d5d9c5abc (patch) | |
tree | e295de4e03277edc4b982a9bb420b7fa6c6b4a64 /src/nvim/normal.c | |
parent | facb1d897e67f3ed71de658854d34cf48f4a3b98 (diff) | |
download | rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.tar.gz rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.tar.bz2 rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.zip |
vim-patch:8.1.0542: shiftwidth() does not take 'vartabstop' into account
Problem: shiftwidth() does not take 'vartabstop' into account.
Solution: Use the cursor position or a position explicitly passed.
Also make >> and << work better with 'vartabstop'. (Christian
Brabandt)
https://github.com/vim/vim/commit/f951416a8396a54bbbe21de1a8b16716428549f2
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 0b4e2e1f23..3587b12277 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -6777,9 +6777,10 @@ static void nv_g_cmd(cmdarg_T *cap) } coladvance((colnr_T)i); if (flag) { - do + do { i = gchar_cursor(); - while (ascii_iswhite(i) && oneright()); + } while (ascii_iswhite(i) && oneright()); + curwin->w_valid &= ~VALID_WCOL; } curwin->w_set_curswant = true; break; |