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)
f951416a83
This commit is contained in:
VVKot
2021-02-13 20:02:48 +00:00
parent facb1d897e
commit 7fc58ec99a
9 changed files with 129 additions and 12 deletions

View File

@@ -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;