Commit f7d09b33 authored by Alexander.Trofimov's avatar Alexander.Trofimov

update cursor by top line

parent 8c98e7fe
No related merge requests found
......@@ -1594,18 +1594,21 @@
// при такой комбинации ctrl+a, click, ctrl+a, click не обновляется selectionStart
// поэтому выполняем обработку после обработчика системы
setTimeout(function () {
var b = t.input.selectionStart;
var e = t.input.selectionEnd;
if (typeof b !== "undefined") {
if (t.cursorPos !== b || t.selectionBegin !== t.selectionEnd) {
t._moveCursor(kPosition, b);
}
if (b !== e) {
t._selectChars(kPosition, e);
}
}
t._updateCursorByTopLine();
});
};
CellEditor.prototype._updateCursorByTopLine = function () {
var b = this.input.selectionStart;
var e = this.input.selectionEnd;
if (typeof b !== "undefined") {
if (this.cursorPos !== b || this.selectionBegin !== t.selectionEnd) {
this._moveCursor(kPosition, b);
}
if (b !== e) {
this._selectChars(kPosition, e);
}
}
};
CellEditor.prototype._syncEditors = function () {
var t = this;
......@@ -2676,6 +2679,7 @@
}
this.skipTLUpdate = true;
this.replaceText(0, this.textRender.getEndOfLine(this.cursorPos), this.input.value);
this._updateCursorByTopLine();
return true;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment