From 90551a03ac67a996eff0b9b643d376b4794fe87b Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 14 Sep 2022 20:10:01 +0200 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index da630da90a..8ab86d4acd 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;