]> git.lyx.org Git - features.git/blobdiff - src/Paragraph.cpp
Fix "default" encoding to match "auto" encoding except for the actual output
[features.git] / src / Paragraph.cpp
index 8054bb9daaf181b00fc90110da76374f7d37f89c..de4021db3be9e3f178119f467327a28d08e7c7c9 100644 (file)
@@ -2056,11 +2056,11 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                // Switch file encoding if necessary
                if (runparams.encoding->package() == Encoding::inputenc &&
                    font.language()->encoding()->package() == Encoding::inputenc) {
-                       int const count = switchEncoding(os, bparams,
+                       std::pair<bool, int> const enc_switch = switchEncoding(os, bparams,
                                        runparams.moving_arg, *(runparams.encoding),
                                        *(font.language()->encoding()));
-                       if (count > 0) {
-                               column += count;
+                       if (enc_switch.first) {
+                               column += enc_switch.second;
                                runparams.encoding = font.language()->encoding();
                        }
                }