Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c6a2f418e6 | |||
0d2d89329e | |||
6b9ce052e9 |
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@@ -10,7 +10,8 @@
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"--disable-extensions", // 调试时禁用其他扩展
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
|
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
@@ -7,5 +7,11 @@
|
||||
"out": true // set this to false to include "out" folder in search results
|
||||
},
|
||||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
||||
"typescript.tsc.autoDetect": "off"
|
||||
"typescript.tsc.autoDetect": "off",
|
||||
|
||||
// Code Spell Checker 插件
|
||||
"cSpell.words": [
|
||||
"Gitee",
|
||||
"coder-xiaomo"
|
||||
],
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ import { commands as pathCommands } from './core/path-convert/types/SupportPathF
|
||||
import * as CyclicConversionPath from './core/path-convert/cyclic-conversion';
|
||||
|
||||
// Common
|
||||
import { createStatusBarItem, updateStatusBarItemVisable } from './handler/status-bar-handler';
|
||||
import { createStatusBarItem, updateStatusBarItemVisible } from './handler/status-bar-handler';
|
||||
import { EOL } from './types/EOLType';
|
||||
import { getUserConfigurations } from './utils/user-configuration';
|
||||
|
||||
@@ -77,7 +77,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}
|
||||
|
||||
// 判断是否展示状态栏按钮
|
||||
updateStatusBarItemVisable(selectTextLength);
|
||||
updateStatusBarItemVisible(selectTextLength);
|
||||
|
||||
// 循环转换:记录当前选中内容,并且进行转换
|
||||
let eol: EOL = textEditor.document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n';
|
||||
@@ -104,7 +104,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
onTextEditorSelectionChangeCallback(textEditor, selections);
|
||||
} else { // 进入 else 的场景举例: 从[代码编辑器]切换到[设置页]
|
||||
// 判断是否展示状态栏按钮
|
||||
updateStatusBarItemVisable(selectTextLength);
|
||||
updateStatusBarItemVisible(selectTextLength);
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -40,7 +40,7 @@ export function createStatusBarItem() {
|
||||
*
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
export function updateStatusBarItemVisable(selectTextLength: number) {
|
||||
export function updateStatusBarItemVisible(selectTextLength: number) {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (editor && selectTextLength > 0) {
|
||||
statusBarItemList.forEach(statusBarItem => {
|
||||
|
Reference in New Issue
Block a user