m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

Experimental Sixel support (#2544)

This commit is contained in:
Junegunn Choi
2023-10-23 01:01:47 +09:00
parent a33749eb71
commit b1a0ab8086
9 changed files with 117 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ var offsetRegexp *regexp.Regexp = regexp.MustCompile("(.*)\x1b\\[([0-9]+);([0-9]
var offsetRegexpBegin *regexp.Regexp = regexp.MustCompile("^\x1b\\[[0-9]+;[0-9]+R")
func (r *LightRenderer) PassThrough(str string) {
r.queued.WriteString(str)
r.queued.WriteString("\x1b7" + str + "\x1b8")
r.flush()
}
@@ -756,6 +756,10 @@ func (r *LightRenderer) NewWindow(top int, left int, width int, height int, prev
return w
}
func (w *LightWindow) DrawBorder() {
w.drawBorder(false)
}
func (w *LightWindow) DrawHBorder() {
w.drawBorder(true)
}
@@ -1095,7 +1099,8 @@ func (w *LightWindow) FinishFill() {
}
func (w *LightWindow) Erase() {
w.drawBorder(false)
// We don't erase the window here to avoid flickering during scroll
w.DrawBorder()
w.Move(0, 0)
w.FinishFill()
w.Move(0, 0)
}