From 882f438e503663125ceb115e86dddef8c318882d Mon Sep 17 00:00:00 2001 From: Ethan P Date: Fri, 26 Jul 2019 14:50:09 -0700 Subject: [PATCH] Fixed batgrep incorrect highlighting --- src/batgrep.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/batgrep.sh b/src/batgrep.sh index 641c99e..1d39354 100755 --- a/src/batgrep.sh +++ b/src/batgrep.sh @@ -96,8 +96,6 @@ do_print() { FIRST_PRINT=false # Print the file. - unset LAST_LR[0] - unset LAST_LH[0] bat "${BAT_ARGS[@]}" \ "${LAST_LR[@]}" \ "${LAST_LH[@]}" \ @@ -115,8 +113,8 @@ while IFS=':' read -r file line column; do if [[ "$LAST_FILE" != "$file" ]]; then do_print LAST_FILE="$file" - LAST_LR='' - LAST_LH='' + LAST_LR=() + LAST_LH=() fi # Calculate the context line numbers.