fix(sioyek): pass abspath in synctex script

This commit is contained in:
Barrett Ruth 2026-03-12 15:52:01 -04:00
parent f1cc5ca1ba
commit 66c1be4b45
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 10 additions and 3 deletions

View file

@ -2,11 +2,17 @@
file="$1"
line="$2"
echo "$(date) file='$file' line='$line'" >> ~/.debug
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] || continue
result=$(nvim --server "$sock" --remote-expr "bufnr('$file')" 2>/dev/null)
result=$(nvim --server "$sock" --remote-expr "bufnr('$file')" 2>&1)
echo " sock='$sock' bufnr='$result'" >> ~/.debug
if [ "$result" != "-1" ] && [ -n "$result" ]; then
nvim --server "$sock" --remote-expr "execute('b +$line $file | normal! zz')"
out=$(nvim --server "$sock" --remote-expr "execute('b +$line $file | normal! zz')" 2>&1)
echo " -> sent, result='$out'" >> ~/.debug
exit 0
fi
done
echo " -> no match found" >> ~/.debug