Skip to content

Commit c370871

Browse files
committed
fix:shortcut key
1 parent 5898cf7 commit c370871

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

chat2db-client/src/components/Console/MonacoEditor/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export const appendMonacoValue = (editor: any, text: any, range: IRangeType = 'e
279279
// 在末尾添加内容
280280
case 'end':
281281
newRange = new monaco.Range(lastLine, lastLineLength, lastLine, lastLineLength);
282-
newText = `\n${text}`;
282+
newText = `${text}`;
283283
break;
284284
default:
285285
break;
@@ -296,7 +296,7 @@ export const appendMonacoValue = (editor: any, text: any, range: IRangeType = 'e
296296
if (range === 'end') {
297297
setTimeout(() => {
298298
editor.revealLine(lastLine + 1);
299-
editor.setPosition({ lineNumber: lastLine + 1, column: 1 });
299+
editor.setPosition({ lineNumber: lastLine, column: 1 });
300300
}, 0);
301301
}
302302
};

chat2db-client/src/main/menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const registerAppMenu = (mainWindow) => {
8383
submenu: [
8484
{
8585
label: '打开日志',
86-
accelerator: process.platform === 'darwin' ? 'Cmd+Shift+L' : 'Ctrl+Shift+L',
86+
accelerator: process.platform === 'darwin' ? 'Cmd+Shift+T' : 'Ctrl+Shift+T',
8787
click() {
8888
const fileName = '.chat2db/logs/application.log';
8989
const url = path.join(os.homedir(), fileName);

chat2db-client/src/pages/main/workspace/components/WorkspaceRight/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const WorkspaceRight = memo<IProps>((props: IProps) => {
6262
// 注册快捷键command+shift+L新建console
6363
useEffect(() => {
6464
const handleKeyDown = (e: KeyboardEvent) => {
65-
console.log(e.metaKey, e.shiftKey, e.code === 'KeyL', e);
6665
if (e.metaKey && e.shiftKey && e.code === 'KeyL') {
6766
addConsole();
6867
}

0 commit comments

Comments
 (0)