commit f9c60d477d18a73c85fd277d75aeafb8edc1fbec
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Mar 16 05:01:53 2024 +0100

    Simplify b3fe9cb7049da
---
 src/graphics/PreviewLoader.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index dc944b1929..d39a6a8513 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -852,7 +852,6 @@ void PreviewLoader::Impl::dumpData(odocstream & os,
        Encoding const & enc = buffer_.params().encoding();
 
        for (; it != end; ++it) {
-               docstring res;
                bool uncodable_content = false;
                // check whether the content is encodable
                // FIXME: the preview loader should be able
@@ -864,14 +863,13 @@ void PreviewLoader::Impl::dumpData(odocstream & os,
                                        << docstring(1, n)
                                        << "' in preview snippet!");
                                uncodable_content = true;
-                       } else
-                               res += n;
+                       }
                }
                // FIXME UNICODE
                os << "\\begin{preview}\n";
                // do not show incomplete preview
                if (!uncodable_content)
-                       os << res;
+                       os << from_utf8(it->first);
                os << "\n\\end{preview}\n\n";
        }
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to