라이브 편집 인용과 멀티라인 입력 보정
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user