]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
The way this was done here is inconsistent with how it is done
[features.git] / src / Text.cpp
index 5e92dd09bb0d7a8fa18cbb80dab79d1d0f21bdc9..889c21b7f410f0b825858a37373461a58db9a5c2 100644 (file)
@@ -69,7 +69,6 @@
 #include "support/lyxalgo.h"
 #include "support/textutils.h"
 
-#include <limits>
 #include <sstream>
 
 
@@ -1114,7 +1113,7 @@ bool Text::cursorForwardOneWord(Cursor & cur)
        if (lyxrc.mac_like_cursor_movement) {
                // Skip through trailing punctuation and spaces.
                while (pos != lastpos && (par.isChar(pos) || par.isSpace(pos)))
-                        ++pos;
+                       ++pos;
 
                // Skip over either a non-char inset or a full word
                if (pos != lastpos && par.isWordSeparator(pos))
@@ -2049,10 +2048,7 @@ docstring Text::asString(pit_type beg, pit_type end, int options) const
 
 void Text::forOutliner(docstring & os, size_t maxlen, bool shorten) const
 {
-       if (maxlen == 0)
-               maxlen = std::numeric_limits<std::size_t>::max();
-       else
-               LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
+       LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
        for (size_t i = 0; i != pars_.size() && os.length() < maxlen; ++i)
                pars_[i].forOutliner(os, maxlen);
        if (shorten && os.length() >= maxlen)