junegunn / fzf.vim

fzf :heart: vim
MIT License
9.55k stars 583 forks source link

Blink cursor at top right corner's fzf floating window? #1448

Open tmpm697 opened 1 year ago

tmpm697 commented 1 year ago

Should happen with every kind of config, step:

  1. open nvim
  2. start one of supported commands, i.e: :Files or :Buffers
  3. observe blink cursor at top ~right~ left corner's fzf floating window -- I think that block of cursor appear in event of creating floating window and disappear right after the floating window is created but It does cause some disruptions to user while using.

Can we hide/disable that cursor at startup of floating window invoked by fzf.vim commands?

EDIT: it's top left (not top right)

junegunn commented 1 year ago

3. top right corner's

Is it top right or top left? In my case, I'm seeing the cursor at the top-left corner. Anyway, if we're talking about the same thing, hiding the cursor before starting fzf seems to help a little. But I wonder if there's a better way.

(The main fzf plugin file)

diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 7d4d8fe..dd59cd9 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -892,7 +892,7 @@ function! s:execute_term(dict, command, temps) abort
       call s:writefile(s:wrap_cmds(a:command), fzf.temps.batchfile)
       let command = fzf.temps.batchfile
     else
-      let command = a:command
+      let command = "echo $'\\x1b[?25l';".a:command
     endif
     let command .= s:term_marker
     if has('nvim')
tmpm697 commented 1 year ago

It's top left corner (edit 1st post)

yes, hiding cursor before starting fzf seems help but it now happens randomly I think, I can see that if I try to run commands serveral times, sometime I'll get that cursor block again.