mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-08 16:12:09 -07:00
Clear lines even when background color is not set
Also revert the workaround in Vim plugin introduced in fa7c897
.
Related: #814
This commit is contained in:
@@ -430,7 +430,7 @@ function! s:execute(dict, command, use_height, temps) abort
|
|||||||
endif
|
endif
|
||||||
if a:use_height
|
if a:use_height
|
||||||
let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
|
let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
|
||||||
call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; tput el > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
|
call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
|
||||||
else
|
else
|
||||||
execute 'silent !'.command
|
execute 'silent !'.command
|
||||||
endif
|
endif
|
||||||
|
@@ -185,11 +185,10 @@ func (r *LightRenderer) Init() {
|
|||||||
_, x := r.findOffset()
|
_, x := r.findOffset()
|
||||||
if x > 0 {
|
if x > 0 {
|
||||||
r.upOneLine = true
|
r.upOneLine = true
|
||||||
r.stderr("\n")
|
r.makeSpace()
|
||||||
}
|
}
|
||||||
for i := 1; i < r.MaxY(); i++ {
|
for i := 1; i < r.MaxY(); i++ {
|
||||||
r.stderr("\n")
|
r.makeSpace()
|
||||||
r.csi("G")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.mouse {
|
if r.mouse {
|
||||||
@@ -197,12 +196,19 @@ func (r *LightRenderer) Init() {
|
|||||||
}
|
}
|
||||||
r.csi(fmt.Sprintf("%dA", r.MaxY()-1))
|
r.csi(fmt.Sprintf("%dA", r.MaxY()-1))
|
||||||
r.csi("G")
|
r.csi("G")
|
||||||
|
r.csi("K")
|
||||||
// r.csi("s")
|
// r.csi("s")
|
||||||
if r.mouse {
|
if r.mouse {
|
||||||
r.yoffset, _ = r.findOffset()
|
r.yoffset, _ = r.findOffset()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *LightRenderer) makeSpace() {
|
||||||
|
r.stderr("\n")
|
||||||
|
r.csi("G")
|
||||||
|
r.csi("K")
|
||||||
|
}
|
||||||
|
|
||||||
func (r *LightRenderer) move(y int, x int) {
|
func (r *LightRenderer) move(y int, x int) {
|
||||||
// w.csi("u")
|
// w.csi("u")
|
||||||
if r.y < y {
|
if r.y < y {
|
||||||
|
Reference in New Issue
Block a user