mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-03-04 16:31:17 +01:00
Fixed batgrep incorrect highlighting
This commit is contained in:
parent
0b04dfa5f4
commit
882f438e50
@ -96,8 +96,6 @@ do_print() {
|
|||||||
FIRST_PRINT=false
|
FIRST_PRINT=false
|
||||||
|
|
||||||
# Print the file.
|
# Print the file.
|
||||||
unset LAST_LR[0]
|
|
||||||
unset LAST_LH[0]
|
|
||||||
bat "${BAT_ARGS[@]}" \
|
bat "${BAT_ARGS[@]}" \
|
||||||
"${LAST_LR[@]}" \
|
"${LAST_LR[@]}" \
|
||||||
"${LAST_LH[@]}" \
|
"${LAST_LH[@]}" \
|
||||||
@ -115,8 +113,8 @@ while IFS=':' read -r file line column; do
|
|||||||
if [[ "$LAST_FILE" != "$file" ]]; then
|
if [[ "$LAST_FILE" != "$file" ]]; then
|
||||||
do_print
|
do_print
|
||||||
LAST_FILE="$file"
|
LAST_FILE="$file"
|
||||||
LAST_LR=''
|
LAST_LR=()
|
||||||
LAST_LH=''
|
LAST_LH=()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Calculate the context line numbers.
|
# Calculate the context line numbers.
|
||||||
|
Loading…
Reference in New Issue
Block a user