Skip to content

Commit

Permalink
patch 8.2.5122: lisp indenting my run over the end of the line
Browse files Browse the repository at this point in the history
Problem:    Lisp indenting my run over the end of the line.
Solution:   Check for NUL earlier.
  • Loading branch information
brammool committed Jun 18, 2022
1 parent 8d64206 commit 0e8e938
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/indent.c
Expand Up @@ -2029,6 +2029,8 @@ get_lisp_indent(void)
}
}
}
if (*that == NUL)
break;
}
if (*that == '(' || *that == '[')
++parencount;
Expand Down
10 changes: 10 additions & 0 deletions src/testdir/test_indent.vim
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5122,
/**/
5121,
/**/
Expand Down

0 comments on commit 0e8e938

Please sign in to comment.