Fix more bugs in files (#16241)
Fixes: - [x] an issue where directories would only match by prefix, causing both a directory and a file to be matched if in the same directory - [x] An issue where you could not continue a file completion when selecting a directory, as `tab` on a file would always run the command. This effectively disabled directory sub queries. - [x] Inconsistent rendering of files and directories in the slash command Release Notes: - N/A --------- Co-authored-by: max <max@zed.dev>
This commit is contained in:
parent
a3a6ebcf31
commit
455850505f
13 changed files with 415 additions and 47 deletions
|
@ -94,7 +94,7 @@ impl SlashCommand for TabSlashCommand {
|
|||
label: path_string.clone().into(),
|
||||
new_text: path_string,
|
||||
replace_previous_arguments: false,
|
||||
run_command,
|
||||
after_completion: run_command.into(),
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -106,7 +106,7 @@ impl SlashCommand for TabSlashCommand {
|
|||
label: path_string.clone().into(),
|
||||
new_text: path_string,
|
||||
replace_previous_arguments: false,
|
||||
run_command,
|
||||
after_completion: run_command.into(),
|
||||
});
|
||||
|
||||
Ok(active_item_completion
|
||||
|
@ -115,7 +115,7 @@ impl SlashCommand for TabSlashCommand {
|
|||
label: ALL_TABS_COMPLETION_ITEM.into(),
|
||||
new_text: ALL_TABS_COMPLETION_ITEM.to_owned(),
|
||||
replace_previous_arguments: false,
|
||||
run_command: true,
|
||||
after_completion: true.into(),
|
||||
}))
|
||||
.chain(tab_completion_items)
|
||||
.collect())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue