upd: update typewriter mode

This commit is contained in:
purocean
2021-12-28 21:35:58 +08:00
parent f3e1ca143d
commit d778371beb
+1 -1
View File
@@ -292,7 +292,7 @@ whenEditorReady().then(({ editor }) => {
editor.onDidChangeCursorPosition(e => {
if (store.state.typewriterMode) {
const sources = ['deleteLeft', 'keyboard']
if (sources.includes(e.source) && e.reason === 0) {
if (sources.includes(e.source) && (e.reason === 0 || e.reason === 3)) {
editor.revealPositionInCenter(e.position)
}
}