forked from aniani/vim
updated for version 7.3.629
Problem: There is no way to make 'shiftwidth' follow 'tabstop'. Solution: When 'shiftwidth' is zero use the value of 'tabstop'. (Christian Brabandt)
This commit is contained in:
@@ -8899,9 +8899,9 @@ ins_bs(c, mode, inserted_space_p)
|
||||
|
||||
*inserted_space_p = FALSE;
|
||||
if (p_sta && in_indent)
|
||||
ts = curbuf->b_p_sw;
|
||||
ts = (int)get_sw_value();
|
||||
else
|
||||
ts = curbuf->b_p_sts;
|
||||
ts = (int)curbuf->b_p_sts;
|
||||
/* Compute the virtual column where we want to be. Since
|
||||
* 'showbreak' may get in the way, need to get the last column of
|
||||
* the previous character. */
|
||||
@@ -9589,7 +9589,7 @@ ins_tab()
|
||||
* When nothing special, insert TAB like a normal character
|
||||
*/
|
||||
if (!curbuf->b_p_et
|
||||
&& !(p_sta && ind && curbuf->b_p_ts != curbuf->b_p_sw)
|
||||
&& !(p_sta && ind && curbuf->b_p_ts != get_sw_value())
|
||||
&& curbuf->b_p_sts == 0)
|
||||
return TRUE;
|
||||
|
||||
@@ -9605,7 +9605,7 @@ ins_tab()
|
||||
AppendToRedobuff((char_u *)"\t");
|
||||
|
||||
if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
|
||||
temp = (int)curbuf->b_p_sw;
|
||||
temp = (int)get_sw_value();
|
||||
else if (curbuf->b_p_sts > 0) /* use 'softtabstop' when set */
|
||||
temp = (int)curbuf->b_p_sts;
|
||||
else /* otherwise use 'tabstop' */
|
||||
|
Reference in New Issue
Block a user