mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 01:29:35 +02:00
Merge pull request #12672 from overleaf/ae-emacs-compile-keydown
[cm6] Stop propagation of Ctrl-s when Emacs keybindings are enabled GitOrigin-RevId: 32bebefb583ad813931af221cce7498d40fdbaf1
This commit is contained in:
committed by
Copybot
parent
462837b44d
commit
81a8fa2ce3
@@ -8,6 +8,7 @@ import {
|
||||
import { EmacsHandler } from '@replit/codemirror-emacs'
|
||||
import { CodeMirror } from '@replit/codemirror-vim'
|
||||
import { foldCode, toggleFold, unfoldCode } from '@codemirror/language'
|
||||
import { EditorView } from '@codemirror/view'
|
||||
import {
|
||||
cursorToBeginningOfVisualLine,
|
||||
cursorToEndOfVisualLine,
|
||||
@@ -174,7 +175,16 @@ const options = [
|
||||
load: () =>
|
||||
import('@replit/codemirror-emacs').then(m => {
|
||||
customiseEmacsOnce()
|
||||
return m.emacs()
|
||||
return [
|
||||
m.emacs(),
|
||||
EditorView.domEventHandlers({
|
||||
keydown(event) {
|
||||
if (event.ctrlKey && event.key === 's') {
|
||||
event.stopPropagation()
|
||||
}
|
||||
},
|
||||
}),
|
||||
]
|
||||
}),
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user