mirror of
https://github.com/junegunn/fzf.git
synced 2026-01-23 11:32:22 +08:00
Avoid clearing the rest of the current line on start
Fix #4652 Code was reorganized so that it doesn't delete the current line if the cursor is not at the front. This should be acceptable in almost all cases. Thanks to @phanen for reporting the issue and suggesting the fix.
This commit is contained in:
@@ -207,11 +207,6 @@ func (r *LightRenderer) Init() error {
|
||||
if r.fullscreen {
|
||||
r.smcup()
|
||||
} else {
|
||||
// We assume that --no-clear is used for repetitive relaunching of fzf.
|
||||
// So we do not clear the lower bottom of the screen.
|
||||
if r.clearOnExit {
|
||||
r.csi("J")
|
||||
}
|
||||
y, x := r.findOffset()
|
||||
r.mouse = r.mouse && y >= 0
|
||||
// When --no-clear is used for repetitive relaunching, there is a small
|
||||
@@ -222,6 +217,11 @@ func (r *LightRenderer) Init() error {
|
||||
r.upOneLine = true
|
||||
r.makeSpace()
|
||||
}
|
||||
// We assume that --no-clear is used for repetitive relaunching of fzf.
|
||||
// So we do not clear the lower bottom of the screen.
|
||||
if r.clearOnExit {
|
||||
r.csi("J")
|
||||
}
|
||||
for i := 1; i < r.MaxY(); i++ {
|
||||
r.makeSpace()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user