summaryrefslogtreecommitdiffstats
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-07-28 21:17:36 +0200
committerBram Moolenaar <Bram@vim.org>2015-07-28 21:17:36 +0200
commitf7bb86dc593913d055e4cce16cec43f6271adda3 (patch)
treed987f51511bb7af5395ea9adcc467b0a33660dd3 /src/ops.c
parent52e21cf057e313a867b0f529c8e4d52ad5ae740d (diff)
patch 7.4.803v7.4.803
Problem: C indent does not support C11 raw strings. (Mark Lodato) Solution: Do not change indent inside the raw string.
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index a9eec34dc1..ff72258946 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -686,7 +686,7 @@ op_reindent(oap, how)
{
long i;
char_u *l;
- int count;
+ int amount;
linenr_T first_changed = 0;
linenr_T last_changed = 0;
linenr_T start_lnum = curwin->w_cursor.lnum;
@@ -719,11 +719,11 @@ op_reindent(oap, how)
{
l = skipwhite(ml_get_curline());
if (*l == NUL) /* empty or blank line */
- count = 0;
+ amount = 0;
else
- count = how(); /* get the indent for this line */
+ amount = how(); /* get the indent for this line */
- if (set_indent(count, SIN_UNDO))
+ if (amount >= 0 && set_indent(amount, SIN_UNDO))
{
/* did change the indent, call changed_lines() later */
if (first_changed == 0)