mcchrish / nnn.vim

File manager for vim/neovim powered by n³
BSD 2-Clause "Simplified" License
646 stars 25 forks source link

Fix issue #62 (scroll problem in popup window when using vim) #163

Closed greenfoo closed 2 years ago

greenfoo commented 2 years ago

It looks like vim requires the terminal size to be specified in the term_start() function (which must match the size of the popup windows) or else it will create a "virtual" buffer bigger than what is displayed, causing scroll artifacts.

greenfoo commented 2 years ago

I know issue #62 was discarded as "won't fix", but this simple change makes it possible to use the popup mode also in vim (and not just in neovim). Feel free to merge it if you consider it useful (or ignore this PR otherwise) :)

N-R-K commented 2 years ago

From some quick testing in vim v8.2, the patch seems to be working fine for me :)

Could you also revert a07ae1af since popup mode is fixed now ?

N-R-K commented 2 years ago

P.S: Once small visual glitch is that with type-to-nav mode turned on by default (via the -n switch), I see that the status bar doesn't get cleared on startup.

image

The functionality still works fine, and it only happens on startup. So it's a minor issue. But I suppose we shouldn't revert a07ae1af unless/until this bug is fixed as well.

greenfoo commented 2 years ago

Turns out we had to do the same shenanigans with the columns (not just with the rows).

In this latest update type-to-nav mode also works as expected without artifacts (makes sense, as type-to-nav was trying to put characters on the far right side while column width was not known).

Because everything seems to work now I have also reverted a07ae1a as you suggested :)

jarun commented 2 years ago

Thank you!