aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/indent.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 7d3b1f4a3f..27d6f60011 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -1396,11 +1396,13 @@ void fixthisline(IndentGetter get_the_indent)
{
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
- }
+ if (amount < 0) {
+ return;
+ }
+
+ 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
}
}