aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index 55c6267..e39d97c 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -487,6 +487,8 @@ cm.on('focus', () => {
487}) 487})
488 488
489cm.on('beforeChange', (_, change) => { 489cm.on('beforeChange', (_, change) => {
490 textArea.dataset.scrollLine = cm.getCursor().line
491
490 // Don't allow more content after YAML doc separator 492 // Don't allow more content after YAML doc separator
491 if (change.origin && change.origin.match(/^(\+input|paste)$/)) { 493 if (change.origin && change.origin.match(/^(\+input|paste)$/)) {
492 const line = change.to.line 494 const line = change.to.line
@@ -830,7 +832,6 @@ const addSuggestions = (anchor, suggestions) => {
830cm.on('cursorActivity', _ => { 832cm.on('cursorActivity', _ => {
831 menu.style.display = 'none' 833 menu.style.display = 'none'
832 const anchor = cm.getCursor() 834 const anchor = cm.getCursor()
833 textArea.dataset.scrollLine = anchor.line
834 835
835 if (insideCodeblockForMap(anchor)) { 836 if (insideCodeblockForMap(anchor)) {
836 handleTypingInCodeBlock(anchor) 837 handleTypingInCodeBlock(anchor)