summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-08-08 18:01:05 +0200
committerBram Moolenaar <Bram@vim.org>2012-08-08 18:01:05 +0200
commit14f247414733b9dafb50e59320f75e8b56ac6ec6 (patch)
tree3444e7c3c3e666121e317b50e5f7cdd9718dc5f1 /src/edit.c
parentb02612b6411659b6385aea44fe8abb5a2e16d4d7 (diff)
updated for version 7.3.629v7.3.629
Problem: There is no way to make 'shiftwidth' follow 'tabstop'. Solution: When 'shiftwidth' is zero use the value of 'tabstop'. (Christian Brabandt)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 1c614333ff..5fde388f73 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -8899,9 +8899,9 @@ ins_bs(c, mode, inserted_space_p)
*inserted_space_p = FALSE;
if (p_sta && in_indent)
- ts = curbuf->b_p_sw;
+ ts = (int)get_sw_value();
else
- ts = curbuf->b_p_sts;
+ ts = (int)curbuf->b_p_sts;
/* Compute the virtual column where we want to be. Since
* 'showbreak' may get in the way, need to get the last column of
* the previous character. */
@@ -9589,7 +9589,7 @@ ins_tab()
* When nothing special, insert TAB like a normal character
*/
if (!curbuf->b_p_et
- && !(p_sta && ind && curbuf->b_p_ts != curbuf->b_p_sw)
+ && !(p_sta && ind && curbuf->b_p_ts != get_sw_value())
&& curbuf->b_p_sts == 0)
return TRUE;
@@ -9605,7 +9605,7 @@ ins_tab()
AppendToRedobuff((char_u *)"\t");
if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
- temp = (int)curbuf->b_p_sw;
+ temp = (int)get_sw_value();
else if (curbuf->b_p_sts > 0) /* use 'softtabstop' when set */
temp = (int)curbuf->b_p_sts;
else /* otherwise use 'tabstop' */