修复右键菜单未能正确展示的问题
This commit is contained in:
parent
ad15636256
commit
138bf53f41
@ -26,7 +26,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add extension logo
|
- Add extension logo (添加插件 logo)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue where the editor context menu was not displayed correctly. (修复右键菜单未能正确展示的问题)
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
"activationEvents": [],
|
"activationEvents": [
|
||||||
|
"onStartupFinished", // 当编辑器完成启动时激活
|
||||||
|
"onTextSelected" // 当用户选中文本时激活
|
||||||
|
],
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [
|
"commands": [
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
"activationEvents": [],
|
"activationEvents": [
|
||||||
|
"onStartupFinished",
|
||||||
|
"onTextSelected"
|
||||||
|
],
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ const handleEditorReplace = (targetCase: SupportCase) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('============ start convert ============');
|
// console.log('============ start convert ============');
|
||||||
let document = editor.document;
|
let document = editor.document;
|
||||||
let selection = editor.selection;
|
let selection = editor.selection;
|
||||||
let eol: EOL = document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n';
|
let eol: EOL = document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n';
|
||||||
@ -45,7 +45,7 @@ const handleEditorReplace = (targetCase: SupportCase) => {
|
|||||||
editor.edit(editBuilder => {
|
editor.edit(editBuilder => {
|
||||||
editBuilder.replace(selection, converted);
|
editBuilder.replace(selection, converted);
|
||||||
});
|
});
|
||||||
console.log('============ finish convert ============');
|
// console.log('============ finish convert ============');
|
||||||
};
|
};
|
||||||
|
|
||||||
export default handleEditorReplace;
|
export default handleEditorReplace;
|
||||||
|
Loading…
Reference in New Issue
Block a user