Skip to content

Commit

Permalink
Massively improve performance of BASIC live updates
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Sep 3, 2024
1 parent 581998c commit 6c0c927
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gui/qt/basicdebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,7 @@ MainWindow::debug_basic_status_t MainWindow::debugBasicUpdate(bool force) {
std::swap(thisEditor, otherEditor);
}
m_basicCurrToken.cursor = QTextCursor(thisEditor->document());

m_basicCurrToken.cursor.movePosition(QTextCursor::MoveOperation::Start, QTextCursor::MoveMode::MoveAnchor, 0);
m_basicCurrToken.cursor.movePosition(QTextCursor::MoveOperation::Right, QTextCursor::MoveMode::MoveAnchor, posinfo.offset);
m_basicCurrToken.cursor.setPosition(posinfo.offset);
m_basicCurrLine.cursor = m_basicCurrToken.cursor;
m_basicCurrToken.cursor.movePosition(QTextCursor::MoveOperation::Right, QTextCursor::MoveMode::KeepAnchor, posinfo.len);

Expand Down

0 comments on commit 6c0c927

Please sign in to comment.