aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-12-13 14:18:05 -0500
committerJustin M. Keyes <justinkz@gmail.com>2015-12-13 14:18:05 -0500
commit77c0f9a62b4fd465ac9e37d0839695e100238a1c (patch)
tree594a08f870c79f2ea49a5b0bcfed9cb533d4be2e /src/nvim/ops.c
parent8a34d21b0d8e06edfbe02d47e4f045e0e97c996e (diff)
parentad34a376eb164852d2983341a9137a1e06a24bb9 (diff)
downloadrneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.tar.gz
rneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.tar.bz2
rneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.zip
Merge #3623 'vim-patch:7.4.{670,723,803}'
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index bef0ebaeed..52b4fed9d7 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -554,7 +554,7 @@ void op_reindent(oparg_T *oap, Indenter 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;
@@ -582,11 +582,11 @@ void op_reindent(oparg_T *oap, Indenter how)
|| how != get_lisp_indent) {
l = skipwhite(get_cursor_line_ptr());
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)
first_changed = curwin->w_cursor.lnum;