diff options
author | VVKot <volodymyr.kot.ua@gmail.com> | 2021-01-31 17:35:20 +0000 |
---|---|---|
committer | VVKot <volodymyr.kot.ua@gmail.com> | 2021-03-28 08:37:04 +0100 |
commit | 18b73ea3c8380f5c99ae6ec6f915e0d448391677 (patch) | |
tree | 483d61eda3698cf7a6a24703a152095af20223bc /src/nvim/edit.c | |
parent | 2922f6e34bde27fa9788e806f871f50a2b46e6a7 (diff) | |
download | rneovim-18b73ea3c8380f5c99ae6ec6f915e0d448391677.tar.gz rneovim-18b73ea3c8380f5c99ae6ec6f915e0d448391677.tar.bz2 rneovim-18b73ea3c8380f5c99ae6ec6f915e0d448391677.zip |
vim-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)
https://github.com/vim/vim/commit/33d5ab3795720b7d986f9f17f660ee9e448466e0
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 110494bb5c..31bb00a746 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -8206,7 +8206,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p) want_vcol = (want_vcol / curbuf->b_p_sw) * curbuf->b_p_sw; } else { want_vcol = tabstop_start(want_vcol, - curbuf->b_p_sts, + get_sts_value(), curbuf->b_p_vsts_array); } @@ -8703,10 +8703,10 @@ static bool 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) { + || curbuf->b_p_sts != 0) { // use 'softtabstop' when set temp = tabstop_padding(get_nolist_virtcol(), - curbuf->b_p_sts, + get_sts_value(), curbuf->b_p_vsts_array); } else { // otherwise use 'tabstop' |