forked from aniani/vim
updated for version 7.3.693
Problem: Can't make 'softtabstop' follow 'shiftwidth'. Solution: When 'softtabstop' is negative use the value of 'shiftwidth'. (so8res)
This commit is contained in:
15
src/option.c
15
src/option.c
@@ -8509,11 +8509,6 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
|
||||
p_window = Rows - 1;
|
||||
}
|
||||
|
||||
if (curbuf->b_p_sts < 0)
|
||||
{
|
||||
errmsg = e_positive;
|
||||
curbuf->b_p_sts = 0;
|
||||
}
|
||||
if (curbuf->b_p_ts <= 0)
|
||||
{
|
||||
errmsg = e_positive;
|
||||
@@ -11429,3 +11424,13 @@ get_sw_value()
|
||||
{
|
||||
return curbuf->b_p_sw ? curbuf->b_p_sw : curbuf->b_p_ts;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the effective softtabstop value for the current buffer, using the
|
||||
* 'tabstop' value when 'softtabstop' is negative.
|
||||
*/
|
||||
long
|
||||
get_sts_value()
|
||||
{
|
||||
return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
|
||||
}
|
||||
|
Reference in New Issue
Block a user