diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-11-22 03:08:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-11-22 03:08:29 +0100 |
commit | f951416a8396a54bbbe21de1a8b16716428549f2 (patch) | |
tree | 2903bb024e534d4a4c5004beef72f4dc38583b29 /src/ops.c | |
parent | 2b84949ad8f247e5d142e2fb1371b3e37567977a (diff) | |
download | vim-git-f951416a8396a54bbbe21de1a8b16716428549f2.tar.gz |
patch 8.1.0542: shiftwidth() does not take 'vartabstop' into accountv8.1.0542
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)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -334,7 +334,7 @@ shift_line( { int count; int i, j; - int p_sw = (int)get_sw_value(curbuf); + int p_sw = (int)get_sw_value_indent(curbuf); count = get_indent(); /* get current indent */ @@ -386,7 +386,7 @@ shift_block(oparg_T *oap, int amount) int total; char_u *newp, *oldp; int oldcol = curwin->w_cursor.col; - int p_sw = (int)get_sw_value(curbuf); + int p_sw = (int)get_sw_value_indent(curbuf); #ifdef FEAT_VARTABS int *p_vts = curbuf->b_p_vts_array; #endif |