aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/vim.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 10:19:25 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 10:23:35 -0400
commit6a8436065ca7282569fd4d96b1c02a8ba8eaacf1 (patch)
tree57c7c58d216376a56fa65e217a80177624a5619f /runtime/indent/vim.vim
parent2081504a331f2ca97922056f6b42b8d0e6c2e306 (diff)
downloadrneovim-6a8436065ca7282569fd4d96b1c02a8ba8eaacf1.tar.gz
rneovim-6a8436065ca7282569fd4d96b1c02a8ba8eaacf1.tar.bz2
rneovim-6a8436065ca7282569fd4d96b1c02a8ba8eaacf1.zip
vim-patch:9faec4e3d439
Update runtime files. https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849 Omit vim9.
Diffstat (limited to 'runtime/indent/vim.vim')
-rw-r--r--runtime/indent/vim.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 3b5d7828c1..3cebf299f1 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()