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

Add support for hyperlinks in preview window

Close #2165
This commit is contained in:
Junegunn Choi
2024-08-14 08:43:27 +09:00
parent 2c8a96bb27
commit d90a969c00
6 changed files with 80 additions and 10 deletions

View File

@@ -1118,6 +1118,14 @@ func (w *LightWindow) setBg() string {
return "\x1b[m"
}
func (w *LightWindow) LinkBegin(uri string, params string) {
w.renderer.queued.WriteString("\x1b]8;" + params + ";" + uri + "\x1b\\")
}
func (w *LightWindow) LinkEnd() {
w.renderer.queued.WriteString("\x1b]8;;\x1b\\")
}
func (w *LightWindow) Fill(text string) FillReturn {
w.Move(w.posy, w.posx)
code := w.setBg()