[PATCH 6/6] mergetools: vimdiff: check for empty fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In zsh 'foo#bar#' produces an empty field at the end.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 mergetools/vimdiff | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index 06937acbf5..27d1644faf 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -87,7 +87,7 @@ gen_cmd_aux () {
 	IFS=#
 	for c in $(echo "$LAYOUT" | sed 's:.:&#:g')
 	do
-		if test "$c" = " "
+		if test "$c" = " " || test -z "$c"
 		then
 			continue
 		fi
@@ -155,7 +155,7 @@ gen_cmd_aux () {
 	do
 		i=$(( i + 1 ))
 
-		if test "$c" = " "
+		if test "$c" = " " || test -z "$c"
 		then
 			continue
 		fi
-- 
2.39.2.13.g1fb56cf030




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux