mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
runtime(vim): Fix indent after line with literal dict
closes: #13966 Signed-off-by: Andrew Radev <andrey.radev@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e06e437665
commit
415a5a951b
5
runtime/autoload/dist/vimindent.vim
vendored
5
runtime/autoload/dist/vimindent.vim
vendored
@@ -3,6 +3,9 @@ vim9script
|
|||||||
# Language: Vim script
|
# Language: Vim script
|
||||||
# Maintainer: github user lacygoill
|
# Maintainer: github user lacygoill
|
||||||
# Last Change: 2023 Jun 29
|
# Last Change: 2023 Jun 29
|
||||||
|
#
|
||||||
|
# Includes Changes from Vim:
|
||||||
|
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
|
||||||
|
|
||||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||||
#
|
#
|
||||||
@@ -381,7 +384,7 @@ const LINE_CONTINUATION_AT_EOL: string = '\%('
|
|||||||
# It can be the start of a dictionary or a block.
|
# It can be the start of a dictionary or a block.
|
||||||
# We only want to match the former.
|
# We only want to match the former.
|
||||||
.. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
|
.. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
|
||||||
.. '\)\s*\%(\s#.*\)\=$'
|
.. '\)\s*\%(\s#[^{].*\)\=$'
|
||||||
# }}}2
|
# }}}2
|
||||||
# SOL {{{2
|
# SOL {{{2
|
||||||
# BACKSLASH_AT_SOL {{{3
|
# BACKSLASH_AT_SOL {{{3
|
||||||
|
@@ -946,3 +946,8 @@ Blue
|
|||||||
Black
|
Black
|
||||||
endenum
|
endenum
|
||||||
" END_INDENT
|
" END_INDENT
|
||||||
|
|
||||||
|
" START_INDENT
|
||||||
|
call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
|
||||||
|
call prop_type_delete('indent_after_literal_dict')
|
||||||
|
" END_INDENT
|
||||||
|
@@ -946,3 +946,8 @@ enum Color
|
|||||||
Black
|
Black
|
||||||
endenum
|
endenum
|
||||||
" END_INDENT
|
" END_INDENT
|
||||||
|
|
||||||
|
" START_INDENT
|
||||||
|
call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
|
||||||
|
call prop_type_delete('indent_after_literal_dict')
|
||||||
|
" END_INDENT
|
||||||
|
Reference in New Issue
Block a user