From b3ab6311c587e18ee202c5205afc658a33f2a23c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 4 Apr 2022 22:06:16 +0900 Subject: [PATCH] Hide cursor while rendering the screen Fix #2781 Fix #2588 Fix #1805 Fix https://github.com/junegunn/fzf.vim/issues/1370 Fix https://github.com/junegunn/fzf.vim/issues/1060 --- CHANGELOG.md | 1 + src/tui/light.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77582a94..d4e74934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG 0.30.0 ------ +- Fixed cursor flickering over the screen by hiding it during rendering - Added `--ellipsis` option. You can take advantage of it to make fzf effectively search non-visible parts of the item. ```sh diff --git a/src/tui/light.go b/src/tui/light.go index 97112981..8f2952b4 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -60,7 +60,7 @@ func (r *LightRenderer) csi(code string) { func (r *LightRenderer) flush() { if r.queued.Len() > 0 { - fmt.Fprint(os.Stderr, r.queued.String()) + fmt.Fprint(os.Stderr, "\x1b[?25l"+r.queued.String()+"\x1b[?25h") r.queued.Reset() } }