20 lines
819 B
Diff
20 lines
819 B
Diff
Index: src/frontends/qt4/GuiViewSource.cpp
|
|
===================================================================
|
|
--- src/frontends/qt4/GuiViewSource.cpp (revision adb00dbcf803298651609c0afac02bc4cb3db003)
|
|
+++ src/frontends/qt4/GuiViewSource.cpp (revision 9f2fcf20a51af2b63161a3290cf5fb02474b42b9)
|
|
@@ -224,12 +224,7 @@
|
|
// position-to-row is unavailable
|
|
// we jump to the first modification
|
|
- const QChar * oc = old.constData();
|
|
- const QChar * nc = qcontent.constData();
|
|
+ int length = min(old.length(), qcontent.length());
|
|
int pos = 0;
|
|
- while (*oc != '\0' && *nc != '\0' && *oc == *nc) {
|
|
- ++oc;
|
|
- ++nc;
|
|
- ++pos;
|
|
- }
|
|
+ for (; pos < length && old.at(pos) == qcontent.at(pos); ++pos) {}
|
|
QTextCursor c = QTextCursor(viewSourceTV->document());
|
|
//get some space below the cursor
|