neovide icon indicating copy to clipboard operation
neovide copied to clipboard

Terminal Column and Line is 2

Open lemonlambda opened this issue 3 years ago • 6 comments

Describe the bug Terminal Column and Line is 2

To Reproduce

:! tput cols
2
:! tput lines
2

Expected behavior It to be accurate

Desktop (please complete the following information):

  • OS: Garuda Linux x86_64
  • Neovide Version 0.9.0
  • Neovim Version 0.7.2

lemonlambda avatar Aug 21 '22 18:08 lemonlambda

Thanks for reporting! Though it's not quite accurate for me in

  • Neovim in TUI on alacritty w/ zsh
  • Neovide

either. Both yield 80 for cols and 24 for lines in my setup, even with no init.vim at all.

MultisampledNight avatar Aug 21 '22 20:08 MultisampledNight

Given that the stdout allocated by :! isn't a real PTY either, what would you expect to have it yield, actually?

MultisampledNight avatar Aug 21 '22 20:08 MultisampledNight

Window size in terminal size form or whatever, since I want to use a plugin that uses these 2 values

lemonlambda avatar Aug 21 '22 22:08 lemonlambda

this is what I get with :term image so I would like that, ~~but this is probably a n/vim thing now that I think about it~~

lemonlambda avatar Aug 21 '22 22:08 lemonlambda

Neovide: image Nvim in Kitty image

lemonlambda avatar Aug 21 '22 22:08 lemonlambda

Window size in terminal size form or whatever, since I want to use a plugin that uses these 2 values

Hm, to be honest, this is probably not going to work the way you'd expect it to. The output buffer used by :! can extend over the window size, and you can't really interact much with it anyways. I see two options here:

  • You ask the plugin author/hack on the plugin yourself to use the Vim functions winwidth() and winheight(). Which may or may not be a solution, depending on what the plugin does.
  • You work around the plugin and set $TERM yourself in your init.vim to something like xterm-256color. Which will yield subsatisfactory results anyways, since even neovim's TUI seems to lie with 80x24 (which is most likely NOT your real window size).

I don't think there's anything meaningful Neovide by itself could do here, without making very wild and maybe wrong assumptions about any plugin, sorry. Or you find a reason your plugin meaningfully uses the :! command to assume things about the Neovim window size.

MultisampledNight avatar Aug 22 '22 09:08 MultisampledNight

Closing this, there's nothing we can do.

The built in https://neovim.io/doc/user/options.html#'columns' https://neovim.io/doc/user/options.html#'lines'

Give what you want though.

fredizzimo avatar Jan 13 '24 06:01 fredizzimo