changeset 35369:a52b970cc005

runtime(kdl): use shiftwidth() instead of &tabstop in indent script Commit: https://github.com/vim/vim/commit/2e3b2a8d8971850f15fb367ddb358a8565e15324 Author: Yinzuo Jiang <jiangyinzuo@foxmail.com> Date: Tue Jun 11 19:06:02 2024 +0200 runtime(kdl): use shiftwidth() instead of &tabstop in indent script closes: https://github.com/vim/vim/issues/14962 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 11 Jun 2024 19:15:06 +0200
parents d41fd597082f
children 28c8d7ddaa88
files runtime/indent/kdl.vim
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/indent/kdl.vim
+++ b/runtime/indent/kdl.vim
@@ -2,7 +2,7 @@
 " Language:         KDL
 " Author:           Aram Drevekenin <aram@poor.dev>
 " 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.
 if exists("b:did_indent")
@@ -19,7 +19,7 @@ function! KdlIndent(...)
   let previous = getline(previousNum)
 
   if previous =~ "{" && previous !~ "}" && line !~ "}" && line !~ ":$"
-    return indent(previousNum) + &tabstop
+    return indent(previousNum) + shiftwidth()
   else
     return indent(previousNum)
   endif