Skip to content

Commit

Permalink
feat: support tab of codemirror6
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Nov 3, 2024
1 parent d2261a3 commit bdb49c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ tags: $:/tags/streams/keyboard-shortcuts $:/tags/streams/contextmenu
key: ((streams-indent))
sq-contextmenu-name : <<lingo Indent $:/plugins/linonetwo/streams-outliner-lib/language/>>
sq-contextmenu-subtitle:
prevent-default: no

<<indent-node-actions>>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
title: $:/plugins/linonetwo/streams-outliner-lib/keyboard-shortcuts/save-and-continue
tags: $:/tags/streams/keyboard-shortcuts
key: ((streams-save-and-continue))
prevent-default: no

<<save-node-actions>>
4 changes: 2 additions & 2 deletions src/streams-outliner-lib/widgets/keyboard-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {


// Add a keyboard event handler
domNode.addEventListener("keydown",function (event) {
domNode.addEventListener("keydown", (event) => {
// CM triggers two events
// second event has:
// defaultPrevented : true
Expand Down Expand Up @@ -96,7 +96,7 @@ KeyboardWidget.prototype.execute = function() {
tiddlerFields = this.wiki.getTiddler(title).fields;
this.shortcutKeysList[i] = tiddlerFields.key !== undefined ? tiddlerFields.key : undefined;
this.shortcutActionList[i] = tiddlerFields.text;
this.shortcutPreventDefaultList[i] = tiddlerFields["prevent-default"] && tiddlerFields["prevent-default"] === "no" ? false : true;
this.shortcutPreventDefaultList[i] = tiddlerFields["prevent-default"] === "no" ? false : true;
this.shortcutParsedList[i] = this.shortcutKeysList[i] !== undefined ? $tw.keyboardManager.parseKeyDescriptors(this.shortcutKeysList[i]) : undefined;
}

Expand Down

0 comments on commit bdb49c2

Please sign in to comment.