add cmd-enter as alternate save command

This commit is contained in:
Anton Dyudin 2015-12-10 15:59:34 -08:00
parent 2b7cc47e26
commit 3f31b23500
2 changed files with 10 additions and 2 deletions

View File

@ -74,7 +74,12 @@ Edit = query {spur:'t',mime:'m'}, recl
render: ->
{mite,octs} = @props.mime
rele codemirror, {value:octs, mode:mite, readOnly:false, autofocus:true}
rele codemirror,
value:octs
mode:mite
readOnly:false
autofocus:true
extraKeys:'Cmd-Enter':@doneEditing
Add = query {spur:'t',path:'t'}, recl
displayName: "Add"

View File

@ -579,7 +579,10 @@ Edit = query({
value: octs,
mode: mite,
readOnly: false,
autofocus: true
autofocus: true,
extraKeys: {
'Cmd-Enter': this.doneEditing
}
});
}
}));