itmecho / neoterm.nvim

Neovim lua plugin for managing a floating terminal window
GNU General Public License v3.0
36 stars 4 forks source link

Neoterm in vertical mode being off-screen in neovide GUI #3

Closed LordMZTE closed 1 month ago

LordMZTE commented 2 years ago

Using the neovide GUI for nvim, the neoterm terminal will appear off to the right side of the viewport when opening neoterm in vertical mode. Both horizontal and fullscreen mode work fine.

itmecho commented 2 years ago

Thanks for opening an issue! Would you be able to provide some more info? I can't reproduce it (bspwm on Arch Linux). In the screenshot you can see the border on the right hand side

image

LordMZTE commented 2 years ago

Sorry for not providing more info, I'll look into it tomorrow.

LordMZTE commented 2 years ago

So, I'm also on Arch but using i3 (don't think that matters tho). This is what neovide looks like opening neoterm: image As you can see, it's not visible. The way I know its on the right is because my cursor has an animation, so I can see it moving.

My nvim config is available here.

itmecho commented 2 years ago

Hmm, are you using neovide-bin by chance? What version are you running?

LordMZTE commented 2 years ago

I'm actually using neovide-git, commit g69902a4.

itmecho commented 2 years ago

I've tried building neovide from source at that commit (69902a4272d3095115cc68368206b4fd785a7b50) and I still can't reproduce the behaviour you're getting. Have you tried building it from source manually?

i.e.

git clone https://github.com/neovide/neovide
cd neovide
cargo build --release

Then run it again and see if it still happens?

muemmel commented 2 years ago

Cheers. I'm experiencing the same issue with neovide using the release binary. However, I think I know why that's happening. It seems as if neovide is placing the windows anchor on the left instead of right. Vertical mode places the window exactly at the last column, meaning it's completely off the screen.

I sorta fixed the issue by changing the target column to about half the value of ui.width.

But I wanted to somewhat customize the position and border of the window, so I added code for that. See my commit here.

I'd like to create a pull request, if that's ok with you @itmecho


Edit Forgot to add: Tested my changes with vertical, horizontal and fullscreen mode without winopts and/or winhighlights without errors. Old configs don't seem to be affected by the changes.

itmecho commented 2 years ago

@muemmel thanks for digging into it!

Yea, open a pr for it, that'd be brilliant =]

muemmel commented 2 years ago

@itmecho Posted the pull request, if you find the time.

dpi0 commented 1 month ago

@itmecho I also noticed this on arch linux (hyprland) with neovide from the official repos on 0.13.3-2

Due to the deprecation of mode option this issue now occurs whenever the width is 1 or 100% in any position

image