-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverse search command not executed in development build #988
Comments
Inverse search should still work. Which program are you using for inverse search and what is your settings for that? |
For me too it didn't work, I thought it might be just my Qt version. It seems that in Qt6 the diff --git a/pdf_viewer/main_widget.cpp b/pdf_viewer/main_widget.cpp
index 20f61e3..b33480b 100644
--- a/pdf_viewer/main_widget.cpp
+++ b/pdf_viewer/main_widget.cpp
@@ -4651,7 +4651,14 @@ std::wstring MainWidget::synctex_under_pos(WindowPos position) {
QString command = QString::fromStdWString(inverse_search_command).arg(file_name, line_string.c_str(), column_string.c_str());
#endif
res = QString("%1 %2 %3").arg(new_path, QString::number(line), QString::number(column)).toStdWString();
- QProcess::startDetached(command);
+ QString arg = QString("-c VimtexInverseSearch %1 '%2'").arg(line_string.c_str(), file_name);
+ QStringList args = {"--headless", arg};
+
+ QProcess::startDetached("/usr/bin/nvim", args);
}
else {
show_error_message(L"inverse_search_command is not set in prefs_user.config");
diff --git a/pdf_viewer_build_config.pro b/pdf_viewer_build_config.pro
index 83d286d..8a027b0 100644
--- a/pdf_viewer_build_config.pro
+++ b/pdf_viewer_build_config.pro
@@ -158,7 +158,8 @@ unix:!mac:!android {
QMAKE_CXXFLAGS += -std=c++17
CONFIG(linux_app_image){
- LIBS += -ldl -Lmupdf/build/release -lmupdf -lmupdf-third -lmupdf-threads -lharfbuzz -lz
+ DEFINES += LINUX_STANDARD_PATHS
+ LIBS += -ldl -lmupdf -lz
} else {
DEFINES += NON_PORTABLE
DEFINES += LINUX_STANDARD_PATHS @ahrm Thank you for the very good software. I couldn't debug why sending the command with its arguments to startDetached doesn't work anymore in Qt6. |
Can confirm the issue; and the issue happen might because the method |
fix #988, run inverse search command as separated command and args
Should be fixed in ed77c64. |
Hi,
I did a build of the development branch on macOS. With the current release my setting for inverse search does work. But with this branch it seems it doesn't get execute (I have a little bash script that stores the parameters in a file - but nothing is stored)
Is there anything changed regarding inverse search in the current development branch?
Best regards,
Johannes
The text was updated successfully, but these errors were encountered: