commit 90551a03ac67a996eff0b9b643d376b4794fe87b
Author: Enrico Forestieri <[email protected]>
Date: Wed Sep 14 20:10:01 2022 +0200
Amend f426470a
The synctex option can also be specified by a single dash and
any value different from zero will do.
---
src/Buffer.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index da630da..8ab86d4 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1119,8 +1119,10 @@ bool Buffer::isSyncTeXenabled() const
const string dest = c.to().substr(0,3);
if (dest == "dvi" || dest == "pdf") {
const string cmd = c.command();
- enabled |= cmd.find("--synctex=1") !=
string::npos;
- if (enabled) break;
+ enabled |= cmd.find("-synctex=") != string::npos
+ && cmd.find("-synctex=0") ==
string::npos;
+ if (enabled)
+ break;
}
}
return enabled;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs