diff options
author | Christoph (Sheogorath) Kern | 2018-02-25 14:25:26 +0100 |
---|---|---|
committer | GitHub | 2018-02-25 14:25:26 +0100 |
commit | f642a1159900b332d3e88efd538cec22e3c8615a (patch) | |
tree | eeea50d23421627116962b69623f3aaa11b32bfa | |
parent | 6bcc72e09004a6f350005809008c3ecf14d45c41 (diff) | |
parent | 9c77e9d7f0fbf48d8f8462b0020801c7878d1901 (diff) |
Merge pull request #739 from SISheogorath/fix/sublime-esc
Allow the usage of the esc-key by codemirror
Diffstat (limited to '')
-rw-r--r-- | public/js/lib/editor/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index 003b32b7..bc228b7b 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -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 () { |