슬래시 하이라이트 인덱스 보정 분리
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
} from '../../lib/markdown-editor-media.js'
|
||||
import {
|
||||
addSlashSuppressedLine,
|
||||
clampSlashHighlightedIndex,
|
||||
filterSlashCommands,
|
||||
getMediaPickerKindFromSlashAction,
|
||||
getSlashCommandFocusTarget,
|
||||
@@ -2567,9 +2568,7 @@ watch(liveSlashQuery, () => {
|
||||
})
|
||||
|
||||
watch(visibleLiveSlashCommands, (commands) => {
|
||||
if (liveSlashHighlightedIndex.value >= commands.length) {
|
||||
liveSlashHighlightedIndex.value = Math.max(0, commands.length - 1)
|
||||
}
|
||||
liveSlashHighlightedIndex.value = clampSlashHighlightedIndex(liveSlashHighlightedIndex.value, commands.length)
|
||||
|
||||
updateLiveSlashMenuPosition()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user