aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/cpp.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-01-09 09:37:04 +0800
committerzeertzjq <zeertzjq@outlook.com>2026-01-09 09:37:08 +0800
commit4faf23679e0c90b86466fa57cb5d97641ceb9a16 (patch)
tree0faa4647e6dafced6886a9585e29d4a2d37ee640 /runtime/syntax/cpp.vim
parent03e9797bb21c77084cf1558405649a6bd6c4c15e (diff)
downloadrneovim-4faf23679e0c90b86466fa57cb5d97641ceb9a16.tar.gz
rneovim-4faf23679e0c90b86466fa57cb5d97641ceb9a16.tar.bz2
rneovim-4faf23679e0c90b86466fa57cb5d97641ceb9a16.zip
vim-patch:9179ddc: runtime(yaml): update YAML indentation for mapping keys inside list items
When a list item contains a mapping key (e.g., '- element1:'), the content under that key was incorrectly indented. The indent function was not accounting for the '- ' prefix when calculating indentation for nested content. Example that now works correctly: list: - element1: foo: bar # Now correctly at indent 6, not 4 The fix adds special handling in two places: 1. When previous line ends with ':' and starts with '- ' 2. When looking up previous mapping key that is a list item Fixes indentation to account for the 2-character '- ' prefix. fixes: vim/vim#18943 closes: vim/vim#19133 https://github.com/vim/vim/commit/9179ddc0608813e9dd7cf9ba856d61669d6f0e3a Co-authored-by: Cezar Dimoiu <cezar.dimoiu@keysight.com>
Diffstat (limited to 'runtime/syntax/cpp.vim')
0 files changed, 0 insertions, 0 deletions