sioyek
sioyek copied to clipboard
Inverse-search gives wrong path inside WSL
Inverse-search gives wrong path inside WSL
OS
❯ hostnamectl
Static hostname: sul-IBR1
Icon name: computer-container
Chassis: container
Machine ID: 429ac08b232f467ab44eb35b05b94a3d
Boot ID: d7d798959a794b879fa2ff57cf51162e
Virtualization: wsl
Operating System: Ubuntu 22.04.4 LTS
Kernel: Linux 5.15.133.1-microsoft-standard-WSL2
Architecture: x86-64
Command Executed:
sioyek.exe --inverse-search "wsl echo %2 %1 >> /home/sul/textest/test-sync.log" '/home/sul/textest/main.pdf'
Expected Behavior:
15 home/sul/textest/main.tex
7 home/sul/textest/main.tex
7 home/sul/textest/main.tex
3 home/sul/textest/main.tex
3 home/sul/textest/main.tex
3 home/sul/textest/main.tex
15 home/sul/textest/main.tex
15 home/sul/textest/main.tex
9 home/sul/texttest/main.tex
9 home/sul/textest/main.tex
7 home/sul/textest/main.tex
Actual Behavior:
15 homesul extestmain.tex
7 homesul extestmain.tex
7 homesul extestmain.tex
3 homesul extestmain.tex
3 homesul extestmain.tex
3 homesul extestmain.tex
15 homesul extestmain.tex
15 homesul extestmain.tex
9 homesul extestmain.tex
9 homesul extestmain.tex
7 homesul extestmain.tex
it's look like /t
is perceived like tab and single forwardslash /
is ignored
I don't use WSL so I don't directly debug the issue right now, but we do have a vimtex_wsl_fix
config option which I don't exactly remember what it does, but maybe it helps your case?
we do have a vimtex_wsl_fix config option
Yea, it is exactly for setting up vimtex in wsl, but for some reason it doesn't fix my problem. I tried set vimtex_wsl_fix 1
and remove it, for me it doesn't change output in /home/sul/textest/test-sync.log
.
which I don't exactly remember what it does
in repo we can see some comments about what vimtex_wsl_fix
is for
#ifdef Q_OS_WIN
// the path returned by synctex is formatted in unix style, for example it is something like this
// in windows: d:/some/path/file.pdf
// this doesn't work with Vimtex for some reason, so here we have to convert the path separators
// to windows style and make sure the driver letter is capitalized
QDir file_path = QDir(file_name);
QString new_path = QDir::toNativeSeparators(file_path.absolutePath());
new_path[0] = new_path[0].toUpper();
if (VIMTEX_WSL_FIX) {
new_path = file_name;
}
#endif
It's confusing because, as far as I understand people already using sioyek
inverse-search with wsl,
why is not working.
Any updates on this?