diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-23 19:23:58 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-27 09:21:28 -0400 |
commit | f0bf853f41ac4ad765bf279c331669d8c9d1e5c5 (patch) | |
tree | 4ff8f493ac157a33329a0a41d300cfe4c38de103 /runtime/indent | |
parent | ecb48e7f8a8ade4a83cb4b6bd12d80a893832ec1 (diff) | |
download | rneovim-f0bf853f41ac4ad765bf279c331669d8c9d1e5c5.tar.gz rneovim-f0bf853f41ac4ad765bf279c331669d8c9d1e5c5.tar.bz2 rneovim-f0bf853f41ac4ad765bf279c331669d8c9d1e5c5.zip |
vim-patch:2e693a88b24d
Update runtime files.
https://github.com/vim/vim/commit/2e693a88b24dc6b12883fad78ff2cb9cd4469c98
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/testdir/yaml.in | 14 | ||||
-rw-r--r-- | runtime/indent/testdir/yaml.ok | 14 | ||||
-rw-r--r-- | runtime/indent/yaml.vim | 4 |
3 files changed, 30 insertions, 2 deletions
diff --git a/runtime/indent/testdir/yaml.in b/runtime/indent/testdir/yaml.in new file mode 100644 index 0000000000..e3d77e2543 --- /dev/null +++ b/runtime/indent/testdir/yaml.in @@ -0,0 +1,14 @@ +# vim: set ft=yaml sw=2 et : + +# START_INDENT +map1: +sub1: +- list item +map2: +- another list +# END_INDENT + +# START_INDENT +map: &anchor +map: val +# END_INDENT diff --git a/runtime/indent/testdir/yaml.ok b/runtime/indent/testdir/yaml.ok new file mode 100644 index 0000000000..b97b2e5896 --- /dev/null +++ b/runtime/indent/testdir/yaml.ok @@ -0,0 +1,14 @@ +# vim: set ft=yaml sw=2 et : + +# START_INDENT +map1: + sub1: + - list item +map2: + - another list +# END_INDENT + +# START_INDENT +map: &anchor +map: val +# END_INDENT diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim index 3eb16f845d..9621b2b6ed 100644 --- a/runtime/indent/yaml.vim +++ b/runtime/indent/yaml.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: YAML " Maintainer: Nikolai Pavlov <zyx.vim@gmail.com> -" Last Change: 2017 Jun 13 +" Last Change: 2019 Sep 28 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -29,7 +29,7 @@ function s:FindPrevLessIndentedLine(lnum, ...) let curindent = a:0 ? a:1 : indent(a:lnum) while prevlnum \&& indent(prevlnum) >= curindent - \&& getline(prevlnum) =~# '^\s*#' + \&& getline(prevlnum) !~# '^\s*#' let prevlnum = prevnonblank(prevlnum-1) endwhile return prevlnum |