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'))
},
Esc: function (cm) {
if (cm.getOption('keyMap').substr(0, 3) === 'vim') {
return CodeMirror.Pass
} else if (cm.getOption('fullScreen')) {
if (cm.getOption('fullScreen') && !(cm.getOption('keyMap').substr(0, 3) === 'vim')) {
cm.setOption('fullScreen', false)
} else {
return CodeMirror.Pass
}
},
'Cmd-S': function () {