jhawthorn/fzy

Question: why would fzy lines persist while fzf does not (in tintin++)?

shmup opened this issue · 2 comments

shmup commented

This is me running a shell script from tintin++, a mud client (for the terminal). I noticed this behavior recently, and then tested fzf to see how it handles it. This does not happen when running these scripts directly from my shell. However, there being a difference in behavior for fzy and fzf makes me wonder what the difference in technique is.

fzf example
Notice that when I cancel out (or if I selected something), there is no extra "lines" eaten up? I lack the words here heh

fzf_example.mp4

fzy example
Notice here that it keeps the lines used, which creates this gap.. again, I lack words lol

fzy_example.mp4

Any clue what exactly is the difference in technique, and furthermore, if this is something you'd be interested in tackling? Minimally, if you have any thoughts/ideas about the difference in behavior, maybe you could give me a little bit of detail.. Perhaps myself, or someone else in the future, would tackle it.

casr commented

My guess is that fzf uses the 'alternate screen' whereas fzy does not. It's about telling the terminal emulator that you wish to 'save' the current output on screen and switch to something else and then you 'restore' back to the other screen when you're done.

This answer to a similar question posed about Vim is answered by Thomas Dickey who maintains the terminfo database that ncurses uses. As far as I know, fzy has its own terminal UI so if this was a desired feature you would need to add to it.

shmup commented

@casr that's a nice explanation, thanks. I'll go ahead and close this.