mirror of
https://github.com/edu4rdshl/based.fish.git
synced 2026-07-17 23:24:46 +00:00
(chore): better repaint handling
This commit is contained in:
parent
62cd9b2f17
commit
aa00038f28
1 changed files with 7 additions and 2 deletions
|
|
@ -12,13 +12,18 @@ function __based_fzf_popup
|
||||||
|
|
||||||
if test -n "$chosen"
|
if test -n "$chosen"
|
||||||
commandline -r -- "$chosen"
|
commandline -r -- "$chosen"
|
||||||
|
# Prevent autocomplete samples from remaining before the selected command.
|
||||||
|
# i.e: if you run `cd`, then arrow up, and select a command, the initial `cd` will be
|
||||||
|
# visible before the selected command, like: `cd cd <path>`. It doesn't affect functionality,
|
||||||
|
# but it can be visually confusing.
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
|
|
||||||
# Only execute if the user pressed ENTER and confirmation is set
|
# Only execute if the user pressed ENTER and confirmation is set
|
||||||
if test "$key" = enter; and set -q BASED_NO_CONFIRMATION; and test "$BASED_NO_CONFIRMATION" != 0
|
if test "$key" = enter; and set -q BASED_NO_CONFIRMATION; and test "$BASED_NO_CONFIRMATION" != 0
|
||||||
commandline -f execute
|
commandline -f execute
|
||||||
end
|
end
|
||||||
else
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Update the display for commands like directory changes
|
||||||
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue