Skip to content

Commit

Permalink
#164 shortcut keys are bound twice when there is only one notebook (#165
Browse files Browse the repository at this point in the history
)
  • Loading branch information
wangcheng15 authored Mar 29, 2022
1 parent 6cadb49 commit bffaeb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/page/Workspace/Notebook/CellList/command.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
this.$shortcut.unbind('3')
this.$shortcut.unbind('4')
},
bindAllKey () {
bindAllKey: debounce(function () {
if (this.currentNotebook.id !== this.activeNotebookId) {
return
} else if (this.currentNotebook.type === 'workflow') {
Expand All @@ -88,7 +88,7 @@ export default {
this.$shortcut.bind('up', debounce(this.selectPrevCell, 200))
this.$shortcut.bind('down', debounce(this.selectNextCell, 200))
this.bindSomeKey()
},
}, 200),
bindSomeKey () {
if (this.mode === 'command') {
this.$shortcut.bind('A', debounce(this.insertCellUp, 200))
Expand Down

0 comments on commit bffaeb0

Please sign in to comment.