mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 19:59:46 +00:00
parent
857548d33b
commit
9f2fcf20a5
@ -223,14 +223,9 @@ void ViewSourceWidget::realUpdateView()
|
|||||||
if (changed && !texrow_.get()) {
|
if (changed && !texrow_.get()) {
|
||||||
// position-to-row is unavailable
|
// position-to-row is unavailable
|
||||||
// we jump to the first modification
|
// we jump to the first modification
|
||||||
const QChar * oc = old.constData();
|
int length = min(old.length(), qcontent.length());
|
||||||
const QChar * nc = qcontent.constData();
|
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
while (*oc != '\0' && *nc != '\0' && *oc == *nc) {
|
for (; pos < length && old.at(pos) == qcontent.at(pos); ++pos) {}
|
||||||
++oc;
|
|
||||||
++nc;
|
|
||||||
++pos;
|
|
||||||
}
|
|
||||||
QTextCursor c = QTextCursor(viewSourceTV->document());
|
QTextCursor c = QTextCursor(viewSourceTV->document());
|
||||||
//get some space below the cursor
|
//get some space below the cursor
|
||||||
c.setPosition(pos);
|
c.setPosition(pos);
|
||||||
|
@ -247,4 +247,6 @@ What's new
|
|||||||
|
|
||||||
- Update boost source to 1.62.
|
- Update boost source to 1.62.
|
||||||
|
|
||||||
- fix compiler warnings from clang 3.9 and gcc 6.
|
- Fix compiler warnings from clang 3.9 and gcc 6.
|
||||||
|
|
||||||
|
- Fix compilation with Qt 5.8.
|
||||||
|
Loading…
Reference in New Issue
Block a user