mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 14:28:10 +09:00
fix(command): trim spaces
This commit is contained in:
parent
8fb9739f69
commit
b4cda4338f
@ -60,7 +60,7 @@ const searchResult = $computed<QueryResult>(() => {
|
||||
})
|
||||
|
||||
const result = $computed<QueryResult>(() => commandMode
|
||||
? registry.query(scopes.map(s => s.id).join('.'), input.slice(1))
|
||||
? registry.query(scopes.map(s => s.id).join('.'), input.slice(1).trim())
|
||||
: searchResult,
|
||||
)
|
||||
|
||||
@ -79,13 +79,13 @@ const onCommandActivate = (item: QueryResultItem) => {
|
||||
}
|
||||
else if (item.onComplete) {
|
||||
scopes.push(item.onComplete())
|
||||
input = '>'
|
||||
input = '> '
|
||||
}
|
||||
}
|
||||
const onCommandComplete = (item: QueryResultItem) => {
|
||||
if (item.onComplete) {
|
||||
scopes.push(item.onComplete())
|
||||
input = '>'
|
||||
input = '> '
|
||||
}
|
||||
else if (item.onActivate) {
|
||||
item.onActivate()
|
||||
|
@ -119,7 +119,7 @@ export function closePreviewHelp() {
|
||||
}
|
||||
|
||||
export function openCommandPanel(isCommandMode = false) {
|
||||
commandPanelInput.value = isCommandMode ? '>' : ''
|
||||
commandPanelInput.value = isCommandMode ? '> ' : ''
|
||||
isCommandPanelOpen.value = true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user