1
0
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:
Bram Moolenaar
2012-10-21 00:10:39 +02:00
parent 205f9f5e2d
commit 9f340fa57b
4 changed files with 19 additions and 11 deletions

View File

@@ -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;
}