]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetInclude.cpp
FindAdv: Do not use data from included listing if in search mode
[features.git] / src / insets / InsetInclude.cpp
index dba295636c9c2849eb049184d4b92b4ce66346c7..51cc147333a727b50a10e7bebe28087e35b0737f 100644 (file)
@@ -967,10 +967,15 @@ int InsetInclude::plaintext(odocstringstream & os,
        }
 
        if (isVerbatim(params()) || isListings(params())) {
-               os << '[' << screenLabel() << '\n'
-                  // FIXME: We don't know the encoding of the file, default to UTF-8.
-                  << includedFileName(buffer(), params()).fileContents("UTF-8")
-                  << "\n]";
+               if (op.for_search) {
+                       os << '[' << screenLabel() << ']';
+               }
+               else {
+                       os << '[' << screenLabel() << '\n'
+                          // FIXME: We don't know the encoding of the file, default to UTF-8.
+                          << includedFileName(buffer(), params()).fileContents("UTF-8")
+                          << "\n]";
+               }
                return PLAINTEXT_NEWLINE + 1; // one char on a separate line
        }