summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-22 03:08:29 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-22 03:08:29 +0100
commitf951416a8396a54bbbe21de1a8b16716428549f2 (patch)
tree2903bb024e534d4a4c5004beef72f4dc38583b29 /src/ops.c
parent2b84949ad8f247e5d142e2fb1371b3e37567977a (diff)
downloadvim-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ops.c b/src/ops.c
index 7564fac7d..004d5093c 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -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