changeset 34184:c781be83e11e

runtime(qml): Use shiftwidth() in indent plugin (#13908) Commit: https://github.com/vim/vim/commit/50dbe16cd8180eb03e8589694b574d610e6d562c Author: dkearns <dougkearns@gmail.com> Date: Wed Jan 24 06:33:32 2024 +1100 runtime(qml): Use shiftwidth() in indent plugin (https://github.com/vim/vim/issues/13908) Fixes https://github.com/vim/vim/issues/13907 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 23 Jan 2024 20:45:05 +0100
parents 451cd2d34952
children bfb925ee6bc8
files runtime/indent/qml.vim
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/indent/qml.vim
+++ b/runtime/indent/qml.vim
@@ -1,7 +1,7 @@
 " Vim indent file
 " Language:     QML
 " Maintainer:   Chase Knowlden <haroldknowlden@gmail.com>
-" Last Change:  2023 Aug 16
+" Last Change:  2024 Jan 24 by Vim Project
 "
 " Improved JavaScript indent script.
 
@@ -40,10 +40,10 @@ function! s:GetQmlIndent()
 
   " bracket/brace/paren blocks
   if pline =~ '[{[(]$'
-    let ind += &sw
+    let ind += shiftwidth()
   endif
   if line =~ '^[}\])]'
-    let ind -= &sw
+    let ind -= shiftwidth()
   endif
 
   " '/*' comments