Skip to content

Commit

Permalink
Restore OS conditions for inverse search
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjiaodawang committed Feb 28, 2024
1 parent 7a0d359 commit 56d0e9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pdf_viewer/main_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4761,7 +4761,11 @@ std::wstring MainWidget::synctex_under_pos(WindowPos position) {
std::string column_string = std::to_string(column);

if (inverse_search_command.size() > 0) {
QString command = QString::fromStdWString(inverse_search_command).arg(new_path, line_string.c_str());
#ifdef Q_OS_WIN
QString command = QString::fromStdWString(inverse_search_command).arg(new_path, line_string.c_str(), column_string.c_str());
#else
QString command = QString::fromStdWString(inverse_search_command).arg(file_name, line_string.c_str(), column_string.c_str());
#endif
QStringList args = QProcess::splitCommand(command);
QProcess::startDetached(args[0], args.mid(1));
}
Expand Down

0 comments on commit 56d0e9f

Please sign in to comment.