Skip to content

Commit f642a11

Browse files
authored
Merge pull request #739 from SISheogorath/fix/sublime-esc
Allow the usage of the esc-key by codemirror
2 parents 6bcc72e + 9c77e9d commit f642a11

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

public/js/lib/editor/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export default class Editor {
1818
cm.setOption('fullScreen', !cm.getOption('fullScreen'))
1919
},
2020
Esc: function (cm) {
21-
if (cm.getOption('keyMap').substr(0, 3) === 'vim') {
22-
return CodeMirror.Pass
23-
} else if (cm.getOption('fullScreen')) {
21+
if (cm.getOption('fullScreen') && !(cm.getOption('keyMap').substr(0, 3) === 'vim')) {
2422
cm.setOption('fullScreen', false)
23+
} else {
24+
return CodeMirror.Pass
2525
}
2626
},
2727
'Cmd-S': function () {

0 commit comments

Comments
 (0)