aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/indent.c3
-rw-r--r--src/nvim/testdir/test_indent.vim10
2 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 9d60cf9dfe..271498d41a 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -656,6 +656,9 @@ int get_lisp_indent(void)
}
}
}
+ if (*that == NUL) {
+ break;
+ }
}
if ((*that == '(') || (*that == '[')) {
parencount++;
diff --git a/src/nvim/testdir/test_indent.vim b/src/nvim/testdir/test_indent.vim
index be55227bd2..3b5b643177 100644
--- a/src/nvim/testdir/test_indent.vim
+++ b/src/nvim/testdir/test_indent.vim
@@ -144,6 +144,16 @@ func Test_lisp_indent()
close!
endfunc
+func Test_lisp_indent_quoted()
+ " This was going past the end of the line
+ new
+ setlocal lisp autoindent
+ call setline(1, ['"[', '='])
+ normal Gvk=
+
+ bwipe!
+endfunc
+
" Test for setting the 'indentexpr' from a modeline
func Test_modeline_indent_expr()
let modeline = &modeline