fix!: selecting multiple files only opens buffers, not windows (#111)
In an oil buffer you can select multiple entries by highlighting them in
visual mode and then calling `oil.select()` (or using a keymap that does
so, like `<CR>` or `<C-s>`. Previously we would automatically assume
that you wanted to open multiple entries as splits. Now, we treat a
default call to `select()` (which is what `<CR>` does) as if you simply
wanted to open the buffers and keep the same window. This plays nicer
with bufferlines. If you want the old behavior, you can explicitly pass
in `oil.select({vertical = true})` or use the `<C-s>` keymap when you
have multiple entries selected.
This commit is contained in:
parent
a465123659
commit
393f0dcf82
2 changed files with 1 additions and 6 deletions
|
|
@ -194,7 +194,7 @@ M.open_cmdline = {
|
|||
}
|
||||
|
||||
M.copy_entry_path = {
|
||||
desc = "Copy the filepath of the entry under the cursor to the + register",
|
||||
desc = "Yank the filepath of the entry under the cursor to a register",
|
||||
callback = function()
|
||||
local entry = oil.get_cursor_entry()
|
||||
local dir = oil.get_current_dir()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue