aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorVVKot <volodymyr.kot.ua@gmail.com>2021-02-13 20:02:48 +0000
committerVVKot <volodymyr.kot.ua@gmail.com>2021-03-28 08:38:21 +0100
commit7fc58ec99a7546851d2a87b6548fd36d5d9c5abc (patch)
treee295de4e03277edc4b982a9bb420b7fa6c6b4a64 /src/nvim/ops.c
parentfacb1d897e67f3ed71de658854d34cf48f4a3b98 (diff)
downloadrneovim-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/ops.c')
-rw-r--r--src/nvim/ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index ffa3e3d55f..e5de57ceaa 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -288,7 +288,7 @@ void shift_line(
{
int count;
int i, j;
- int p_sw = get_sw_value(curbuf);
+ int p_sw = (int)get_sw_value_indent(curbuf);
count = get_indent(); // get current indent
@@ -332,9 +332,9 @@ static void shift_block(oparg_T *oap, int amount)
const int oldstate = State;
char_u *newp;
const int oldcol = curwin->w_cursor.col;
- const int p_sw = get_sw_value(curbuf);
- const long p_ts = curbuf->b_p_ts;
+ int p_sw = (int)get_sw_value_indent(curbuf);
long *p_vts = curbuf->b_p_vts_array;
+ const long p_ts = curbuf->b_p_ts;
struct block_def bd;
int incr;
int i = 0, j = 0;