m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Add 'bell' action to ring the terminal bell

This commit is contained in:
Junegunn Choi
2025-01-25 11:22:32 +09:00
parent 02199cd609
commit 04017c25bb
8 changed files with 22 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ const consoleDevice string = "/dev/tty"
var offsetRegexp = regexp.MustCompile("(.*)\x1b\\[([0-9]+);([0-9]+)R")
var offsetRegexpBegin = regexp.MustCompile("^\x1b\\[[0-9]+;[0-9]+R")
func (r *LightRenderer) Bell() {
r.flushRaw("\a")
}
func (r *LightRenderer) PassThrough(str string) {
r.queued.WriteString("\x1b7" + str + "\x1b8")
}