diff --git a/share/functions/nextd-or-forward-word.fish b/share/functions/nextd-or-forward-word.fish index 5d9ea2abe..037dd9946 100644 --- a/share/functions/nextd-or-forward-word.fish +++ b/share/functions/nextd-or-forward-word.fish @@ -1,6 +1,6 @@ - function nextd-or-forward-word - if test -z (commandline) + set -l cmd (commandline) + if test -z "$cmd" nextd commandline -f repaint else diff --git a/share/functions/prevd-or-backward-word.fish b/share/functions/prevd-or-backward-word.fish index 5ecaac46f..bbaca8aea 100644 --- a/share/functions/prevd-or-backward-word.fish +++ b/share/functions/prevd-or-backward-word.fish @@ -1,5 +1,6 @@ function prevd-or-backward-word - if test -z (commandline) + set -l cmd (commandline) + if test -z "$cmd" prevd commandline -f repaint else