From 2efac069999344c3adc0acbac83ee8c8266a5e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Mon, 29 Jul 2024 00:49:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8D=E5=AE=8C=E7=BE=8E=E6=94=AF?= =?UTF-8?q?=E6=8C=81=EF=BC=9A=E5=BD=93=E5=AD=90=E7=AA=97=E5=8F=A3=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B8=BB=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E7=8A=B6=E6=80=81=E6=A0=8F=E8=83=BD=E5=A4=9F=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E5=BC=B9=E5=87=BA=E5=BF=AB=E9=80=9F=E6=8B=BE=E5=8F=96?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 ++++++- src/extension.ts | 13 +++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac48826..b521d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --> +## 1.0.11 + +### Improvement + +- Imperfect support: When a sub window is activated, clicking on the status bar of the main window can correctly bring up the QuickPick menu. 不完美支持:当子窗口激活时,点击主窗口状态栏能够正确弹出快速拾取菜单 + ## 1.0.10 ### Added @@ -59,7 +65,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix bug: The infobox showed `editor is undefined` when the current active TAB was not an editor - ## 1.0.4 ### Added diff --git a/src/extension.ts b/src/extension.ts index af5d0f0..f99605c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -57,8 +57,17 @@ export function activate(context: vscode.ExtensionContext) { */ vscode.window.onDidChangeActiveTextEditor(event => { console.log('onDidChangeActiveTextEditor', event); - // 判断是否展示状态栏按钮 - updateStatusBarItemVisable(selectTextLength); + + // 小窗中编辑器选中后,不做其他点击鼠标点击操作,直接点击主窗口任务栏[变量转换]按钮 + // 能够在主窗口 QuickPick 中对小窗中所选文字进行转换操作 (不太完美的兼容) + let textEditor = vscode.window.activeTextEditor; + if (textEditor) { + const selections = textEditor.selections; + onTextEditorSelectionChangeCallback(textEditor, selections); + } else { // 进入 else 的场景举例: 从[代码编辑器]切换到[设置页] + // 判断是否展示状态栏按钮 + updateStatusBarItemVisable(selectTextLength); + } }); /** From 2f3dc60ca24b05bedf9faa8fdc6934933eaf24ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Mon, 29 Jul 2024 00:49:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=BA=201.0.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-comment.jsonc | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-comment.jsonc b/package-comment.jsonc index 43e5678..bd6ece6 100644 --- a/package-comment.jsonc +++ b/package-comment.jsonc @@ -4,7 +4,7 @@ "displayName": "Variable Conversion", "description": "一个强大的变量名转换插件,支持右键菜单、快捷键、状态栏等多种方式使用,支持小驼峰、大驼峰(帕斯卡)、下划线(蛇形)、中划线(连字符/脊柱式)、空格分隔、点分隔、全小写、全大写等常用命名方式(及组合)转换。 \nA powerful variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. Support camel, pascal, snake, kebab(spinal), space, dot, lower, upper case, and more.", // 版本号 - "version": "1.0.10", + "version": "1.0.11", // logo "icon": "image/logo.png", "publisher": "coder-xiaomo", diff --git a/package-lock.json b/package-lock.json index a1be089..3293b51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "variable-conversion", - "version": "0.0.1", + "version": "1.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "variable-conversion", - "version": "0.0.1", + "version": "1.0.11", "devDependencies": { "@types/mocha": "^10.0.6", "@types/node": "18.x", diff --git a/package.json b/package.json index a09765d..9859852 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "variable-conversion", "displayName": "Variable Conversion", "description": "一个强大的变量名转换插件,支持右键菜单、快捷键、状态栏等多种方式使用,支持小驼峰、大驼峰(帕斯卡)、下划线(蛇形)、中划线(连字符/脊柱式)、空格分隔、点分隔、全小写、全大写等常用命名方式(及组合)转换。 \nA powerful variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. Support camel, pascal, snake, kebab(spinal), space, dot, lower, upper case, and more.", - "version": "1.0.10", + "version": "1.0.11", "icon": "image/logo.png", "publisher": "coder-xiaomo", "engines": {