Fix texlab forward search

This commit is contained in:
Natsu Kagami 2024-06-23 17:40:07 +02:00
parent ea7e32973a
commit c59b47c1ce
Signed by: nki
GPG key ID: 55A032EB38B49ADB
3 changed files with 5 additions and 15 deletions

View file

@ -3,11 +3,11 @@
function usage
echo "Usage: "
echo " kaktex set [client] [session]"
echo " kaktex jump [file] [line]"
echo " kaktex jump [file] [line] [column]"
exit 1
end
if test (count $argv) -ne 3
if test (count $argv) -lt 3
usage
end
@ -19,7 +19,7 @@ switch $argv[1]
echo "
evaluate-commands -client $_kaktex_client %{
evaluate-commands -try-client $_kaktex_client %{
edit -- $argv[2] $argv[3]
edit -existing -- $argv[2] $(math $argv[3] + 1) $(math $argv[4] + 1)
}
}
" | kak -p $_kaktex_session