]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Fix f-args usage in vim9script
authorSergey Matveev <stargrave@stargrave.org>
Fri, 19 May 2023 16:28:22 +0000 (19:28 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 19 May 2023 16:28:22 +0000 (19:28 +0300)
vim/.vim/pack/stargrave/start/defsplit/autoload/defsplit.vim

index 5e647edfd490ec24cd28c7c7517759d6cbb854fb..8fb89e839c83c9d3a15c302c8c867bf8a5844408 100644 (file)
@@ -46,8 +46,8 @@ enddef
 
 const Brs = {"(": ")", "[": "]", "{": "}"}
 
-export def Do(brsAllowable: list<string>, singleLineComma: bool, ...args: list<number>)
-    var skip = len(args) == 0 ? 0 : args[1]
+export def Do(brsAllowable: list<string>, singleLineComma: bool, ...args: list<string>)
+    var skip = len(args) == 0 ? 0 : str2nr(args[0])
     var shift = get(b:, "defsplit_shift", "    ")
     var line = getline(".")
     var prfx: string