diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-12-13 14:18:05 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-12-13 14:18:05 -0500 |
commit | 77c0f9a62b4fd465ac9e37d0839695e100238a1c (patch) | |
tree | 594a08f870c79f2ea49a5b0bcfed9cb533d4be2e /src/nvim/edit.c | |
parent | 8a34d21b0d8e06edfbe02d47e4f045e0e97c996e (diff) | |
parent | ad34a376eb164852d2983341a9137a1e06a24bb9 (diff) | |
download | rneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.tar.gz rneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.tar.bz2 rneovim-77c0f9a62b4fd465ac9e37d0839695e100238a1c.zip |
Merge #3623 'vim-patch:7.4.{670,723,803}'
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 9ba5d96e16..b3222b0781 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -6584,9 +6584,14 @@ static int cindent_on(void) { */ void fixthisline(IndentGetter get_the_indent) { - change_indent(INDENT_SET, get_the_indent(), FALSE, 0, TRUE); - if (linewhite(curwin->w_cursor.lnum)) - did_ai = TRUE; /* delete the indent if the line stays empty */ + int amount = get_the_indent(); + + if (amount >= 0) { + change_indent(INDENT_SET, amount, false, 0, true); + if (linewhite(curwin->w_cursor.lnum)) { + did_ai = true; // delete the indent if the line stays empty + } + } } void fix_indent(void) { |