2
3
ミラー元 https://github.com/sammy-ette/Hilbish 前回の同期 2025-08-10 02:52:03 +00:00

fix: custom handle ctrl c from readline

このコミットが含まれているのは:
TorchedSammy 2022-02-28 18:32:57 -04:00
コミット 36cd4d4123
署名者: sammyette
GPGキーID: 904FC49417B44DCD

ファイルの表示

@ -14,6 +14,7 @@ import (
"github.com/pborman/getopt" "github.com/pborman/getopt"
"github.com/yuin/gopher-lua" "github.com/yuin/gopher-lua"
"github.com/maxlandon/readline"
"golang.org/x/term" "golang.org/x/term"
) )
@ -174,8 +175,12 @@ input:
break break
} }
if err != nil { if err != nil {
// If we get a completely random error, print if err != readline.CtrlC {
fmt.Fprintln(os.Stderr, err) // If we get a completely random error, print
fmt.Fprintln(os.Stderr, err)
}
fmt.Println("^C")
continue
} }
oldInput := input oldInput := input