1
0
Fork 0

lf: bugfix

This commit is contained in:
Luca Bilke 2025-03-13 15:35:57 +01:00
commit 24dae48923
Signed by: luca
GPG key ID: F6E11C9BAA7C82F5
2 changed files with 4 additions and 4 deletions
common/.config/lf

View file

@ -184,9 +184,9 @@ cmd find_word ${{
--preview="$BAT"' --highlight-line {2} {1}' --preview="$BAT"' --highlight-line {2} {1}'
)" )"
file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)" file="$(realpath "$(printf "%s" "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
row="$(echo "$res" | cut -d':' -f2)" row="$(printf "%s" "$res" | cut -d':' -f2)"
column="$(echo "$res" | cut -d':' -f3)" column="$(printf "%s" "$res" | cut -d':' -f3)"
if [ -n "$res" ]; then if [ -n "$res" ]; then
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then

View file

@ -144,7 +144,7 @@ run() {
cat "$cache" cat "$cache"
else else
if out=$("$@"); then if out=$("$@"); then
printf "%s" "$out" | tee -p "$cache" printf "%s" "$out" | tee "$cache"
else else
printf "%s" "$out" printf "%s" "$out"
fi fi