summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.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/ex_getln.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/ex_getln.c')
-rw-r--r--src/ex_getln.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 0c7dd80363..bc92488dae 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2268,10 +2268,12 @@ getexmodeline(promptc, cookie, indent)
if (c1 == Ctrl_T)
{
+ long sw = get_sw_value();
+
p = (char_u *)line_ga.ga_data;
p[line_ga.ga_len] = NUL;
indent = get_indent_str(p, 8);
- indent += curbuf->b_p_sw - indent % curbuf->b_p_sw;
+ indent += sw - indent % sw;
add_indent:
while (get_indent_str(p, 8) < indent)
{
@@ -2323,7 +2325,7 @@ redraw:
p[line_ga.ga_len] = NUL;
indent = get_indent_str(p, 8);
--indent;
- indent -= indent % curbuf->b_p_sw;
+ indent -= indent % get_sw_value();
}
while (get_indent_str(p, 8) > indent)
{