diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-07-02 20:51:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-07-02 20:51:24 +0200 |
commit | 33d5ab3795720b7d986f9f17f660ee9e448466e0 (patch) | |
tree | 38af7f84382c74a45dc271d9f37eac9ac148dde4 /src/edit.c | |
parent | ade55787978e15fe57c5cedf38c9f85bfe1d983c (diff) |
patch 8.1.0138: negative value of 'softtabstop' not used correctlyv8.1.0138
Problem: Negative value of 'softtabstop' not used correctly.
Solution: Use get_sts_value(). (Tom Ryder)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c index d4de825af1..0519a015ed 100644 --- a/src/edit.c +++ b/src/edit.c @@ -9373,7 +9373,7 @@ ins_bs( if (p_sta && in_indent) want_vcol = (want_vcol / curbuf->b_p_sw) * curbuf->b_p_sw; else - want_vcol = tabstop_start(want_vcol, curbuf->b_p_sts, + want_vcol = tabstop_start(want_vcol, get_sts_value(), curbuf->b_p_vsts_array); #else want_vcol = (want_vcol / ts) * ts; @@ -10203,9 +10203,9 @@ ins_tab(void) temp = (int)curbuf->b_p_sw; temp -= get_nolist_virtcol() % temp; } - else if (tabstop_count(curbuf->b_p_vsts_array) > 0 || curbuf->b_p_sts > 0) + else if (tabstop_count(curbuf->b_p_vsts_array) > 0 || curbuf->b_p_sts != 0) /* use 'softtabstop' when set */ - temp = tabstop_padding(get_nolist_virtcol(), curbuf->b_p_sts, + temp = tabstop_padding(get_nolist_virtcol(), get_sts_value(), curbuf->b_p_vsts_array); else /* otherwise use 'tabstop' */ temp = tabstop_padding(get_nolist_virtcol(), curbuf->b_p_ts, |