Closed
Description
Nature of issue?
Found a bug
Details about the bug:
There is a small lag in moving the cursor to its original position after the tidy operation. This I believe is because we wrap the function in a setTimeout which delays it.
setTimeout(() => {
this._cm.focus();
this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT });
}, 0);
Why do we need to use setTimeout here as the position to which we're bringing back the cursor is simply the old line number and character number.
- Web browser and version: Chrome Version 87.0.4280.88
- Operating System: MacOS Big Sur
- Steps to reproduce this bug: Execute the tidy operation using either the keyboard shortcut or in the menu.
Metadata
Metadata
Assignees
Labels
No labels