daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

Should it be possible to resize the window with "set columns"? #156

Open a-torgovitsky opened 5 years ago

a-torgovitsky commented 5 years ago

On gvim: set columns = 50 resizes a window

This also works in terminal nvim (using gnome terminal).

However, this doesn't work for me in neovim-gtk. If the new number of columns is smaller than the old number, then the window stays the same size, but the "editor space" gets reduced. If the new number of columns is larger than the old number, then nothing appears to happen. Is that expected? If so, is there a different command I should be using?

In case it is not expected, here is my system info:

bk2204 commented 2 years ago

I'd also like this feature, except with lines. With gvim, I normally set a 24-character height by default but have a mapping to expand it to the full height of the screen by setting lines. Any other way to do this would also be fine; I'm not picky. I used the latest HEAD on Debian sid/amd64.

jacobmischka commented 2 years ago

I believe I implemented this here, would appreciate if you gave it a shot and let me know if it works how you expect: https://github.com/jacobmischka/neovim-gtk/tree/handle-resize

bk2204 commented 2 years ago

Yeah, that looks great. It seems to do everything I want.

I appreciate the quick patch; I had planned to look at this this weekend, but now I don't have to.

jacobmischka commented 2 years ago

Great!

jacobmischka commented 2 years ago

Just a heads up if you're using that branch in the meantime: I force pushed after realizing I could move some borrows and clones after the checks. Sorry!

bk2204 commented 2 years ago

This is working pretty well for me. @jacobmischka, would you be willing to open a pull request? It would be great to get this incorporated in the main version.

jacobmischka commented 2 years ago

I did a month ago #264

bk2204 commented 2 years ago

Ah, my apologies. I missed that.