File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,15 @@ function state:backup_qflist(scope)
4747 self .backup = {}
4848
4949 local qflist = vim .fn .getqflist ({ items = 0 }).items
50- log .debug (scope , " found %d items in qflist" , vim .fn .len (qflist ))
5150
52- if # qflist == 0 then
51+ if vim . fn . len ( qflist ) == 0 then
5352 log .debug (scope , " no match found for %s" , self .selection )
5453
5554 return false
5655 end
5756
57+ log .debug (scope , " found %d items in qflist" , vim .fn .len (qflist ))
58+
5859 for _ , item in ipairs (qflist ) do
5960 local bufnr = item .bufnr
6061 if bufnr > 0 and vim .api .nvim_buf_is_valid (bufnr ) then
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ local api = {}
77--- @private
88function api .replace (selection , replace )
99 selection = selection or " "
10- vim .print (" cfdo %s/" .. selection .. " /" .. replace .. " /g" )
1110 vim .cmd (" cfdo %s/" .. selection .. " /" .. replace .. " /g" )
1211 vim .cmd (" cfdo update" )
1312end
@@ -31,7 +30,7 @@ function api.get_visual_selection()
3130
3231 -- shouldn't happen but in case it does
3332 local lines = vim .fn .getline (line_start , line_end )
34- if # lines ~ = 1 then
33+ if vim . fn . len ( lines ) = = 1 then
3534 return nil
3635 end
3736
You can’t perform that action at this time.
0 commit comments