Skip to content
Myr

Avoid clearing the rest of the current line on start

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by Junegunn Choi · committed by Junegunn Choi · parent d01eaa9 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:src/tui/light.go+5 added-5 removed
205 unmodified lines
206207 if r.fullscreen {208 r.smcup()209 } else {210 // We assume that --no-clear is used for repetitive relaunching of fzf.211 // So we do not clear the lower bottom of the screen.212 if r.clearOnExit {213 r.csi("J")214 }210 y, x := r.findOffset()211 r.mouse = r.mouse && y >= 0212 // When --no-clear is used for repetitive relaunching, there is a small213 // time frame between fzf processes where the user keystrokes are not
2 unmodified lines
216 if x > 0 && r.clearOnExit {217 r.upOneLine = true218 r.makeSpace()219 }220 // We assume that --no-clear is used for repetitive relaunching of fzf.221 // So we do not clear the lower bottom of the screen.222 if r.clearOnExit {223 r.csi("J")224 }225 for i := 1; i < r.MaxY(); i++ {226 r.makeSpace()227 }228 }
1317 unmodified lines