summaryrefslogtreecommitdiff
path: root/src/tui/light.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-25 11:22:32 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-25 11:22:32 +0900
commit04017c25bb719c31bb18d43b4bcb96c4736f8d91 (patch)
treea531b4403e1882d514875acef907bf979cd8e4c8 /src/tui/light.go
parent02199cd6093353abd659a8218cfe2faae8e55901 (diff)
downloadfzf-04017c25bb719c31bb18d43b4bcb96c4736f8d91.tar.gz
Add 'bell' action to ring the terminal bell
Diffstat (limited to 'src/tui/light.go')
-rw-r--r--src/tui/light.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index f4688060..56e9ae0b 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -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")
}