-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show multiple selected files in the quickfix list
In yazi, it's possible to open one file or multiple files. Now, if a single file is opened, there is no change in behavior. However, if multiple files are opened, the quickfix list will show all the files that are opened.
- Loading branch information
1 parent
4bd98f1
commit 13aa3e4
Showing
6 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
describe('the default configuration', function() | ||
it('can display multiple files in the quickfix list', function() | ||
local config = require('yazi.config').default() | ||
local chosen_files = { '/abc/test-file.txt', '/abc/test-file2.txt' } | ||
|
||
config.hooks.yazi_opened_multiple_files(chosen_files) | ||
|
||
local quickfix_list = vim.fn.getqflist() | ||
|
||
assert.equals(2, #quickfix_list) | ||
assert.equals('/abc/test-file.txt', quickfix_list[1].text) | ||
assert.equals('/abc/test-file2.txt', quickfix_list[2].text) | ||
end) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters