1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

iss #832 Make :q work in vim mode

This commit is contained in:
asmsuechan
2017-09-22 23:57:14 +09:00
parent bb26d9a0a8
commit 4b79bca6bf

View File

@@ -104,6 +104,12 @@ export default class CodeEditor extends React.Component {
let editorTheme = document.getElementById('editorTheme')
editorTheme.addEventListener('load', this.loadStyleHandler)
CodeMirror.Vim.defineEx('quit', 'q', this.quitEditor)
}
quitEditor () {
document.querySelector('textarea').blur()
}
componentWillUnmount () {