diff options
author | Johan Klokkhammer Helsing <johanhelsing@gmail.com> | 2015-11-03 22:04:15 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johanhelsing@gmail.com> | 2015-12-13 13:06:48 +0100 |
commit | 3b472e55b327dc1c4fc034c665398e70d0f7dc77 (patch) | |
tree | b6915ed824c3dffc6c16cf9e6bb79bff6ff47fca /src/nvim/ops.c | |
parent | b0796227166698561506b686dbdf795675e09de1 (diff) | |
download | rneovim-3b472e55b327dc1c4fc034c665398e70d0f7dc77.tar.gz rneovim-3b472e55b327dc1c4fc034c665398e70d0f7dc77.tar.bz2 rneovim-3b472e55b327dc1c4fc034c665398e70d0f7dc77.zip |
vim-patch:7.4.803
Problem: C indent does not support C11 raw strings. (Mark Lodato)
Solution: Do not change indent inside the raw string.
https://github.com/vim/vim/commit/f7bb86dc593913d055e4cce16cec43f6271adda3
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 8 |
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; |