mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user