mirror of
https://github.com/heyman/heynote.git
synced 2025-02-16 10:19:55 +01:00
Don't emit cursorChange if we have a valid line
This commit is contained in:
parent
305ec124ac
commit
35f4bed7c1
@ -285,7 +285,7 @@ const emitCursorChange = (editor) => ViewPlugin.fromClass(
|
||||
if (update.selectionSet || langChange) {
|
||||
const cursorLine = getBlockLineFromPos(update.state, update.state.selection.main.head)
|
||||
const block = getActiveNoteBlock(update.state)
|
||||
if (block) {
|
||||
if (block && cursorLine) {
|
||||
editor.element.dispatchEvent(new SelectionChangeEvent({
|
||||
cursorLine,
|
||||
language: block.language.name,
|
||||
|
Loading…
Reference in New Issue
Block a user