Skip to content

Commit

Permalink
fix: add undo_indent
Browse files Browse the repository at this point in the history
indentexpr amd indentkeys must be reset to the global values when
closing.
  • Loading branch information
e-kwsm committed Dec 4, 2023
1 parent 7c6f28d commit f035582
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indent/cmake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ set cpo&vim
setlocal indentexpr=CMakeGetIndent(v:lnum)
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(

let b:undo_indent = "setl inde< indk<"

" Only define the function once.
if exists("*CMakeGetIndent")
finish
Expand Down

0 comments on commit f035582

Please sign in to comment.