Merge pull request #739 from SISheogorath/fix/sublime-esc

Allow the usage of the esc-key by codemirror
This commit is contained in:
Christoph (Sheogorath) Kern 2018-02-25 14:25:26 +01:00 committed by GitHub
commit f642a11599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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 () {