Skip to content

Commit

Permalink
Fix line numbers are not always correctly updated (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong authored Dec 4, 2024
1 parent 6fa40cf commit c73b459
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CoreEditor/src/modules/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ export function observeChanges() {
clearTimeout(storage.gutterUpdater);
}

// To handle a case where line number rects are not correctly updated
if (update.docChanged) {
window.editor.requestMeasure();
}

storage.gutterUpdater = setTimeout(adjustGutterPositions, 15);
}

Expand Down

0 comments on commit c73b459

Please sign in to comment.