Mercurial > vim
diff src/edit.c @ 14243:fbf0681606fa v8.1.0138
patch 8.1.0138: negative value of 'softtabstop' not used correctly
commit https://github.com/vim/vim/commit/33d5ab3795720b7d986f9f17f660ee9e448466e0
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 2 20:51:24 2018 +0200
patch 8.1.0138: negative value of 'softtabstop' not used correctly
Problem: Negative value of 'softtabstop' not used correctly.
Solution: Use get_sts_value(). (Tom Ryder)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 02 Jul 2018 21:00:08 +0200 |
parents | 2ad722003b36 |
children | 752ef53d3731 |
line wrap: on
line diff
--- 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,