mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:2e3b2a8: runtime(kdl): use shiftwidth() instead of &tabstop in indent script
closes: vim/vim#14962
2e3b2a8d89
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
This commit is contained in:
parent
3ad977f01d
commit
66a1e028e6
@ -2,7 +2,7 @@
|
|||||||
" Language: KDL
|
" Language: KDL
|
||||||
" Author: Aram Drevekenin <aram@poor.dev>
|
" Author: Aram Drevekenin <aram@poor.dev>
|
||||||
" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
||||||
" Last Change: 2024-06-10
|
" Last Change: 2024-06-11
|
||||||
|
|
||||||
" Only load this indent file when no other was loaded.
|
" Only load this indent file when no other was loaded.
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
@ -19,7 +19,7 @@ function! KdlIndent(...)
|
|||||||
let previous = getline(previousNum)
|
let previous = getline(previousNum)
|
||||||
|
|
||||||
if previous =~ "{" && previous !~ "}" && line !~ "}" && line !~ ":$"
|
if previous =~ "{" && previous !~ "}" && line !~ "}" && line !~ ":$"
|
||||||
return indent(previousNum) + &tabstop
|
return indent(previousNum) + shiftwidth()
|
||||||
else
|
else
|
||||||
return indent(previousNum)
|
return indent(previousNum)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user