]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Fix scale parameter for fonts.
[lyx.git] / src / Paragraph.cpp
index f3040b5da1559c39b5a431f460270749fa9d8421..599f720fc05be00e956caa89cbac684d2f9162eb 100644 (file)
@@ -1669,11 +1669,11 @@ void Paragraph::write(ostream & os, BufferParams const & bparams,
                                        os << "\\begin_inset ";
                                        inset->write(os);
                                        os << "\n\\end_inset\n\n";
-                                       // FIXME This can be removed again once the mystery
-                                       // crash has been resolved.
-                                       os << flush;
                                        column = 0;
                                }
+                               // FIXME This can be removed again once the mystery
+                               // crash has been resolved.
+                               os << flush;
                        }
                        break;
                case '\\':
@@ -3852,7 +3852,16 @@ void Paragraph::collectWords()
                        continue;
                pos_type from = pos;
                locateWord(from, pos, WHOLE_WORD);
-               if (pos < from + lyxrc.completion_minlength)
+               // Work around MSVC warning: The statement
+               // if (pos < from + lyxrc.completion_minlength)
+               // triggers a signed vs. unsigned warning.
+               // I don't know why this happens, it could be a MSVC bug, or
+               // related to LLP64 (windows) vs. LP64 (unix) programming
+               // model, or the C++ standard might be ambigous in the section
+               // defining the "usual arithmetic conversions". However, using
+               // a temporary variable is safe and works on all compilers.
+               pos_type const endpos = from + lyxrc.completion_minlength;
+               if (pos < endpos)
                        continue;
                FontList::const_iterator cit = d->fontlist_.fontIterator(from);
                if (cit == d->fontlist_.end())