슬래시 제외 줄 상태 갱신 분리
This commit is contained in:
@@ -44,6 +44,7 @@ import {
|
||||
toggleMediaSelectionState
|
||||
} from '../../lib/markdown-editor-media.js'
|
||||
import {
|
||||
addSlashSuppressedLine,
|
||||
filterSlashCommands,
|
||||
getMediaPickerKindFromSlashAction,
|
||||
getSlashCommandFocusTarget,
|
||||
@@ -51,6 +52,7 @@ import {
|
||||
insertMarkdownLinesAtSlashTarget,
|
||||
isMediaSlashAction,
|
||||
parseSlashInput,
|
||||
removeSlashSuppressedLine,
|
||||
resolveSlashCommand,
|
||||
shouldIgnorePendingMediaSlashCommit
|
||||
} from '../../lib/markdown-slash-commands.js'
|
||||
@@ -2597,9 +2599,7 @@ watch(liveSlashVisible, (visible) => {
|
||||
*/
|
||||
const onLiveSlashEnd = (payload) => {
|
||||
if (typeof payload?.sourceLine === 'number') {
|
||||
const next = new Set(liveSlashSuppressedLines.value)
|
||||
next.delete(payload.sourceLine)
|
||||
liveSlashSuppressedLines.value = next
|
||||
liveSlashSuppressedLines.value = removeSlashSuppressedLine(liveSlashSuppressedLines.value, payload.sourceLine)
|
||||
}
|
||||
|
||||
clearLiveSlashState()
|
||||
@@ -2613,7 +2613,7 @@ const cancelLiveSlashCommand = () => {
|
||||
const line = liveSlashSourceLine.value
|
||||
|
||||
if (line !== null) {
|
||||
liveSlashSuppressedLines.value = new Set([...liveSlashSuppressedLines.value, line])
|
||||
liveSlashSuppressedLines.value = addSlashSuppressedLine(liveSlashSuppressedLines.value, line)
|
||||
}
|
||||
|
||||
clearLiveSlashState()
|
||||
@@ -2686,9 +2686,7 @@ const applyLiveSlashCommand = (command) => {
|
||||
|
||||
if (command.action === 'lines' && Array.isArray(command.lines)) {
|
||||
const replacementLines = command.lines
|
||||
const nextSuppressed = new Set(liveSlashSuppressedLines.value)
|
||||
nextSuppressed.delete(line)
|
||||
liveSlashSuppressedLines.value = nextSuppressed
|
||||
liveSlashSuppressedLines.value = removeSlashSuppressedLine(liveSlashSuppressedLines.value, line)
|
||||
replaceLineRange(line, line, replacementLines, false)
|
||||
clearLiveSlashState()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user