Mercurial > vim
diff runtime/indent/vim.vim @ 24024:ef454a7f485d
Update runtime files.
Commit: https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 27 16:38:07 2021 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Feb 2021 16:45:04 +0100 |
parents | 5b37a0bf7e3a |
children | 5bda4653aced |
line wrap: on
line diff
--- 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()