Explorar o código

vim: add undo_indent to match upstream vim indentation scripts

This resets `inde` (`indentexpr`) and `indk` (`indentkeys`) to the
global values when closing.  Upstream `vim` updated their indentation
scripts in April 2022 to add this.
Eisuke Kawashima %!s(int64=2) %!d(string=hai) anos
pai
achega
27bfbbc2c0
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Auxiliary/vim/indent/cmake.vim

+ 2 - 0
Auxiliary/vim/indent/cmake.vim

@@ -17,6 +17,8 @@ let b:did_indent = 1
 setlocal indentexpr=CMakeGetIndent(v:lnum)
 setlocal indentexpr=CMakeGetIndent(v:lnum)
 setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
 setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
 
 
+let b:undo_indent = "setl inde< indk<"
+
 " Only define the function once.
 " Only define the function once.
 if exists("*CMakeGetIndent")
 if exists("*CMakeGetIndent")
   finish
   finish