Commit: runtime(qml): Use shiftwidth() in indent plugin (#13908)

3 views
Skip to first unread message

Christian Brabandt

unread,
Jan 23, 2024, 2:45:09 PM1/23/24
to vim...@googlegroups.com
runtime(qml): Use shiftwidth() in indent plugin (#13908)

Commit: https://github.com/vim/vim/commit/50dbe16cd8180eb03e8589694b574d610e6d562c
Author: dkearns <dougk...@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 <dougk...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/indent/qml.vim b/runtime/indent/qml.vim
index 8c9fa9125..cf0ba4195 100644
--- a/runtime/indent/qml.vim
+++ b/runtime/indent/qml.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: QML
" Maintainer: Chase Knowlden <haroldk...@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
Reply all
Reply to author
Forward
0 new messages