diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-27 16:38:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-27 16:38:07 +0100 |
commit | 9faec4e3d439968e21ad74e917aebb289df8f849 (patch) | |
tree | 362d9c20c25c3000c17dd57760d4ba465e09ef1a /runtime/indent | |
parent | 0abc6e471ae78167bd75f95603b9bdd27ff0b38f (diff) | |
download | vim-git-9faec4e3d439968e21ad74e917aebb289df8f849.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/vim.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim index d2f5f317a..5c022642b 100644 --- a/runtime/indent/vim.vim +++ b/runtime/indent/vim.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2021 Feb 13 +" Last Change: 2021 Feb 18 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -160,9 +160,9 @@ function GetVimIndentIntern() endif let ends_in_comment = has('syntax_items') - \ && synIDattr(synID(lnum, col('$'), 1), "name") =~ '\(Comment\|String\)$' + \ && synIDattr(synID(lnum, len(getline(lnum)), 1), "name") =~ '\(Comment\|String\)$' - " A line ending in "{"/"[} is most likely the start of a dict/list literal, + " A line ending in "{" or "[" is most likely the start of a dict/list literal, " indent the next line more. Not for a continuation line or {{{. if !ends_in_comment && prev_text_end =~ '\s[{[]\s*$' && !found_cont let ind = ind + shiftwidth() |