1
0
Fork 0

fix fzfgrep in taolf

This commit is contained in:
Luca Bilke 2024-03-06 16:52:03 +01:00
parent 1020104980
commit 10474be914
1 changed files with 6 additions and 1 deletions

View File

@ -166,7 +166,12 @@ cmd fzfgrep ${{
column="$(echo "$res" | cut -d':' -f3)"
if [ -n "$res" ]; then
if [ -n "$VIM" ]; then
lf -remote "send $id pushedit '$file'"
lf -remote "send $id unselect
send $id cd "$(dirname $file)"
send $id set hidden
send $id select "$file"
send $id open
send $id unselect"
elif { [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; } && [ -n "$EMBEDDED" ]; then
lf -remote "send $id \$$EDITOR +'call cursor($row, $column)' -- $([ -n "$EMBEDDED" ] && echo "--") '$file'"
else