Use string interpolation (#12823)
Commit:
https://github.com/vim/vim/commit/bfc461f756c9b933ea6c5d776244667b6b1a84ef
Author: Yegappan Lakshmanan <[email protected]>
Date: Thu Aug 17 13:28:33 2023 -0700
Use string interpolation (https://github.com/vim/vim/issues/12823)
diff --git a/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim
b/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim
index 7a6563078..7a71de476 100644
--- a/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim
+++ b/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim
@@ -1,7 +1,7 @@
vim9script
# cfilter.vim: Plugin to filter entries from a quickfix/location list
-# Last Change: Jun 30, 2022
+# Last Change: August 16, 2023
# Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
# Version: 2.0
#
@@ -31,11 +31,11 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
if qf
Xgetlist = function('getqflist')
Xsetlist = function('setqflist')
- cmd = ':Cfilter' .. bang
+ cmd = $':Cfilter{bang}'
else
Xgetlist = function('getloclist', [0])
Xsetlist = function('setloclist', [0])
- cmd = ':Lfilter' .. bang
+ cmd = $':Lfilter{bang}'
endif
firstchar = searchpat[0]
@@ -62,7 +62,7 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
endif
items = filter(Xgetlist(), Cond)
- title = cmd .. ' /' .. pat .. '/'
+ title = $'{cmd} /{pat}/'
Xsetlist([], ' ', {title: title, items: items})
enddef
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1qWjd6-006Xd1-6c%40256bit.org.