From 1bf46060e22665d3e0e73277622d5c2204d729b8 Mon Sep 17 00:00:00 2001 From: Alison Winters Date: Wed, 28 Feb 2024 18:48:35 +0800 Subject: [PATCH 1/2] bump vscode engine to 1.75.0 --- .vscode-test.mjs | 2 +- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.vscode-test.mjs b/.vscode-test.mjs index 23ca7b8..d400cf0 100644 --- a/.vscode-test.mjs +++ b/.vscode-test.mjs @@ -2,7 +2,7 @@ import { defineConfig } from '@vscode/test-cli'; export default defineConfig({ files: 'out/test/**/*.test.js', - version: '1.74.0', + version: '1.75.0', mocha: { ui: 'tdd', timeout: 2500, diff --git a/package-lock.json b/package-lock.json index 7c1c698..52a5f14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@types/mocha": "^10.0.6", "@types/node": "^18.x", - "@types/vscode": "^1.74.0", + "@types/vscode": "^1.75.0", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "@vscode/test-cli": "^0.0.6", @@ -27,7 +27,7 @@ "webpack-cli": "^5.1.4" }, "engines": { - "vscode": "^1.74.0" + "vscode": "^1.75.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 10d8e9d..dd6477b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "author": "aioutecism", "license": "ISC", "engines": { - "vscode": "^1.74.0" + "vscode": "^1.75.0" }, "main": "./dist/extension.js", "extensionKind": [ @@ -266,7 +266,7 @@ "devDependencies": { "@types/mocha": "^10.0.6", "@types/node": "^18.x", - "@types/vscode": "^1.74.0", + "@types/vscode": "^1.75.0", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "@vscode/test-cli": "^0.0.6", From ac0da9ea33e55e8ca0d3add3ed703ae711e1f908 Mon Sep 17 00:00:00 2001 From: Alison Winters Date: Wed, 28 Feb 2024 19:47:48 +0800 Subject: [PATCH 2/2] slightly adjust preferred column update timeout It seems that onDidChangeTextEditorSelection is being fired more often and/or differently in vscode 1.75.0 so the setTimeout(0) hack is not long enough to allow the outstanding motions to drain. For now increase the timeout to try avoid cursor in the wrong position bug while we think about a better solution. --- src/Dispatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dispatcher.ts b/src/Dispatcher.ts index d58f62c..f6cc6ab 100644 --- a/src/Dispatcher.ts +++ b/src/Dispatcher.ts @@ -72,7 +72,7 @@ export class Dispatcher { await ActionMode.switchByActiveSelections(this._currentMode.id); ActionMoveCursor.updatePreferredColumn(); this._currentMode.onDidChangeTextEditorSelection(); - }, 0); + }, 2); }), window.onDidChangeActiveTextEditor(async () => { if (Configuration.defaultModeID === ModeID.INSERT) {