Remove __fish_repaint

This was a handler for various prompt variables that called a repaint.

Unfortunately, if you set one of those *inside* the prompt (a logical
place for it), this would lead to something like #7775.

So, because this isn't actually *useful* as far as I can see (how do
you set these variables in a way that you're not already inside a
prompt or about to draw a prompt? in a key binding?), we remove it,
like we removed the repaint from git's variable handlers.
This commit is contained in:
Fabian Homborg 2021-03-04 19:20:31 +01:00
parent b1c5e003ef
commit 69c71052ef

View File

@ -109,21 +109,6 @@ function __fish_config_interactive -d "Initializations that should be performed
fish_greeting
end
#
# This event handler makes sure the prompt is repainted when
# fish_color_cwd{,_root} changes value. Like all event handlers, it can't be
# autoloaded.
#
set -l varargs --on-variable fish_key_bindings
for var in user host{,_remote} cwd{,_root} status error
set -a varargs --on-variable fish_color_$var
end
function __fish_repaint $varargs -d "Event handler, repaints the prompt when fish_color_cwd* changes"
if status --is-interactive
commandline -f repaint 2>/dev/null
end
end
#
# Completions for SysV startup scripts. These aren't bound to any
# specific command, so they can't be autoloaded.