Skip to content

Commit ca0583a

Browse files
committed
fix: add missing prevent default
1 parent 17bb980 commit ca0583a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/library.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export const defaultSignalEventResolver = (_, { sendSignal }) => {
5656
switch (event.key) {
5757
// SIGINT, Ctrl + c
5858
case C_KEY:
59+
event.preventDefault()
60+
5961
sendSignal('SIGINT')
6062
}
6163
break
@@ -75,13 +77,13 @@ export const newDefaultEventResolver = () => [defaultHistoryEventResolver, defau
7577
// soon as the component has been mounted
7678
export const createStdout = (formatterOrText, name = 'VueCommandStdout') => markRaw(defineComponent({
7779
name,
78-
setup() {
80+
setup () {
7981
// This tears down the component automatically
8082
const exit = inject('exit')
8183
onMounted(exit)
8284
},
8385

84-
render() {
86+
render () {
8587
if (isFunction(formatterOrText)) {
8688
// This is automatically called with the bound arguments
8789
return formatterOrText()

0 commit comments

Comments
 (0)