]> git.lyx.org Git - features.git/blobdiff - src/Buffer.cpp
Introduce index-tag-all lfun
[features.git] / src / Buffer.cpp
index 96005b92157f18b816c8dbc965d66c4faf994cc5..9826b51f7fd3b0bf068a8961be5bf141c878083c 100644 (file)
@@ -1110,6 +1110,24 @@ bool Buffer::readDocument(Lexer & lex)
 }
 
 
+bool Buffer::isSyncTeXenabled() const
+{
+       bool enabled = params().output_sync;
+
+       if (!enabled)
+               for (auto const & c : theConverters()) {
+                       const string dest = c.to().substr(0,3);
+                       if (dest == "dvi" || dest == "pdf") {
+                               const string cmd = c.command();
+                               enabled |= cmd.find("-synctex=") != string::npos
+                                       && cmd.find("-synctex=0") == string::npos;
+                               if (enabled)
+                                       break;
+                       }
+               }
+       return enabled;
+}
+
 bool Buffer::importString(string const & format, docstring const & contents, ErrorList & errorList)
 {
        Format const * fmt = theFormats().getFormat(format);
@@ -1812,7 +1830,7 @@ Buffer::ExportStatus Buffer::makeLaTeXFile(FileName const & fname,
                lyx_exit(1);
        }
 
-       d->texrow = move(os.texrow());
+       d->texrow = std::move(os.texrow());
 
        ofs.close();
        if (ofs.fail()) {
@@ -2686,7 +2704,7 @@ void Buffer::markDepClean(string const & name)
 }
 
 
-bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
+bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag) const
 {
        if (isInternal()) {
                // FIXME? if there is an Buffer LFUN that can be dispatched even