File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ import {
80
80
watch ,
81
81
inject ,
82
82
defineExpose ,
83
- onBeforeMount ,
83
+ onBeforeUnmount ,
84
84
reactive ,
85
85
nextTick ,
86
86
computed
@@ -244,6 +244,7 @@ const reverseISearch = event => {
244
244
}
245
245
// Cancels the current query or multiline query and creates a new query
246
246
const sigint = () => {
247
+ console .debug (' sigint' )
247
248
if (isEmpty (multilineQueries)) {
248
249
// "setQuery" would overwrite the parent query while we only need to
249
250
// overwrite the locale one
@@ -365,6 +366,10 @@ onMounted(() => {
365
366
})
366
367
}
367
368
})
369
+ onBeforeUnmount (() => {
370
+ // If query is removed from history, unsubscribe from "SIGINT"
371
+ signals .off (' SIGINT' , sigint)
372
+ })
368
373
369
374
defineExpose ({
370
375
focus
You can’t perform that action at this time.
0 commit comments