From 47b99934699f0968f05ac7f6f13b9330d8d7b02d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 26 Aug 2015 21:30:04 +0200 Subject: [PATCH] {prev,next}d-or-*-word: Fix for multiple lines Fixes #2333 --- share/functions/nextd-or-forward-word.fish | 4 ++-- share/functions/prevd-or-backward-word.fish | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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