diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index 003b32b..bc228b7 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 () {