mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 17:50:56 +01:00
Fixed batgrep incorrect highlighting
This commit is contained in:
parent
0b04dfa5f4
commit
882f438e50
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user