라이브 편집 인용과 멀티라인 입력 보정

This commit is contained in:
2026-06-05 10:50:56 +09:00
parent 09b6c51048
commit 56a2c23471
9 changed files with 121 additions and 16 deletions

View File

@@ -237,6 +237,7 @@ const syncSlashState = () => {
*/
const onEditorInput = () => {
syncSlashState()
emit('input', readEditorValue())
}
/**
@@ -859,6 +860,12 @@ const onKeydown = (event) => {
&& props.sourceLine !== null
&& readEditorValue().trim()
) {
const lineContext = getCaretLineContext()
if (resolvedEnterMode.value === 'multiline' && !lineContext.isFirstLine) {
return
}
event.preventDefault()
event.stopPropagation()
emit('merge-with-previous', buildInsertBelowPayload())
@@ -874,6 +881,11 @@ const onKeydown = (event) => {
&& !readEditorValue().trim()
) {
const lineContext = getCaretLineContext()
if (resolvedEnterMode.value === 'multiline' && !lineContext.isFirstLine) {
return
}
const sourceLine = resolvedEnterMode.value === 'multiline'
? props.sourceLine + lineContext.lineIndex
: props.sourceLine