diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-16 22:35:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-16 22:35:02 +0200 |
commit | 2e693a88b24dc6b12883fad78ff2cb9cd4469c98 (patch) | |
tree | 51532c78977a6ef8307d2c290a5627d7fc32753c /runtime/indent | |
parent | 4f2f61a014e80217a2d6ac476c8f94e250a3d0ff (diff) |
Update runtime files.
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 |