mirror of https://github.com/status-im/codimd.git
Merge pull request #739 from SISheogorath/fix/sublime-esc
Allow the usage of the esc-key by codemirror
This commit is contained in:
commit
f642a11599
|
@ -18,10 +18,10 @@ export default class Editor {
|
||||||
cm.setOption('fullScreen', !cm.getOption('fullScreen'))
|
cm.setOption('fullScreen', !cm.getOption('fullScreen'))
|
||||||
},
|
},
|
||||||
Esc: function (cm) {
|
Esc: function (cm) {
|
||||||
if (cm.getOption('keyMap').substr(0, 3) === 'vim') {
|
if (cm.getOption('fullScreen') && !(cm.getOption('keyMap').substr(0, 3) === 'vim')) {
|
||||||
return CodeMirror.Pass
|
|
||||||
} else if (cm.getOption('fullScreen')) {
|
|
||||||
cm.setOption('fullScreen', false)
|
cm.setOption('fullScreen', false)
|
||||||
|
} else {
|
||||||
|
return CodeMirror.Pass
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'Cmd-S': function () {
|
'Cmd-S': function () {
|
||||||
|
|
Loading…
Reference in New Issue