Closed matiuri closed 6 years ago
Default window size stored when window close and then sets with gtk_window_set_default_size
. But later change must generate configure-event
that will change content size. Looks like for some reason resize event does not generate configure-event, but set_default_size generates.
Can't say how to debug this on default ubuntu
Maybe just add some key to disable size saving
I don't get it. Should I disable size saving? If so, how?
I think i can add new option to disable size saving
I don't know if is related, but I can't resize anymore nvim-gtk window, using the window borders. The only way that It works, is if I do right click on the app title bar and select "resize option"
added --disable-win-restore option, you can try it, if this solve this issue.
When I open neovim-gtk with that parameter inside an empty working space, it'll mostly be show as in the first picture, and rarely as in the second one.
Note on the first picture: it seems that neovim might be rendering a bit out of frame, as my top bar is not showing and the bottom black space is too big.
I have kinda like this issue with i3 too. Sometimes it just gets wrong height, and last command line is shifted behind visible part of the window. When it happens I'm usually toggle fullscreen mode to fix it. And this issue appeared after some commits about "window resize" (sad but I don't remember exact one, I guess it was few months ago). In the past I haven't this issue.
@unclechu Do you have the same problem with Airline's buffer line, too?
Can't say how to debug this.
I add ability to log messages for resize events in latest commit.
Please run it like RUST_LOG=nvim_gtk::shell cargo run
Also some questions:
Please past logs from above command here. First reproduce error, then past logs. Maybe latest/ not stable neovim does not have such error?
Neovim version: 0.2.2
The only case on which I can see Airline's buffers bar
DEBUG 2018-02-17T10:44:59Z: nvim_gtk::shell: Init nvim 100/40
DEBUG 2018-02-17T10:44:59Z: nvim_gtk::shell: configure_event (800, 600)
DEBUG 2018-02-17T10:44:59Z: nvim_gtk::shell: configure_event (1916, 1046)
DEBUG 2018-02-17T10:44:59Z: nvim_gtk::shell: on_resize 100/40
DEBUG 2018-02-17T10:44:52Z: nvim_gtk::shell: Init nvim 100/40
DEBUG 2018-02-17T10:44:52Z: nvim_gtk::shell: configure_event (800, 600)
DEBUG 2018-02-17T10:44:52Z: nvim_gtk::shell: configure_event (1916, 1046)
DEBUG 2018-02-17T10:44:53Z: nvim_gtk::shell: ui_try_resize 239/69
DEBUG 2018-02-17T10:44:53Z: nvim_gtk::shell: on_resize 100/40
DEBUG 2018-02-17T10:44:53Z: nvim_gtk::shell: on_resize 239/69
The line's number is moved to the text section
DEBUG 2018-02-17T10:51:16Z: nvim_gtk::shell: Init nvim 100/40
DEBUG 2018-02-17T10:51:16Z: nvim_gtk::shell: configure_event (800, 600)
DEBUG 2018-02-17T10:51:17Z: nvim_gtk::shell: configure_event (1916, 1046)
DEBUG 2018-02-17T10:51:17Z: nvim_gtk::shell: ui_try_resize 239/69
DEBUG 2018-02-17T10:51:17Z: nvim_gtk::shell: on_resize 100/40
DEBUG 2018-02-17T10:51:17Z: nvim_gtk::shell: on_resize 239/69
DEBUG 2018-02-17T10:51:17Z: nvim_gtk::shell: on_resize 239/69
@matiuri
Do you have the same problem with Airline's buffer line, too?
No I don't, but it may be just because I usually don't have vertically split windows along with neovim-gtk window, so I haven't faced issue with window width (only with height).
I found a way to reproduce it properly. I can reproduce it on latest commit: 8bf342ec7f6b0bc0f0877d62a491d4322f9ce266
nvim-gtk
Also if I toggle fullscreen just after nvim-gtk
started this issue also won't appear.
Screencast: https://youtu.be/Kn0G479SAuE
I just realized also that top airline line is also behind the screen after start.
Now the line's number will always be in the text section until I resize the window or create a new line.
Does commit 8bf342e change something? Strange behavior can be some neovim problem, that does not correctly process a lot of size change events. Previously there was some timeout after that size change is applied, i remove it some time ago. Maybe move it back is a good idea.
please try it with latest commit
Same problem with 7e857a1. And yes, the last screenshot was on 8bf342e.
When neovim-gtk starts, everything is OK. Then, on first resize to fill the window, Airline's buffer bar disappear. Finally, on second resize to assure it fills the whole window, the line's number is tabbed. After that, toggling fullscreen on and off will solve everything but Airline's buffer bar, which won't show again.
I have this fixed with f9b20db.
Looks like there two bugs,
so looks like 1 is fixed and 2. not? second question can it be that 2. is not problem of neovim-gtk, but more neovim + some plugin configuration?
Now with f9b20db I have this: Look, when I execute this function: https://github.com/unclechu/neovimrc/blob/fe6326a/my-modules/background-toggle.vim#L4-L10 I have this (see short screencast): https://youtu.be/qWcNBoq4R0Y I have broken size of screen and left-top part of airline at the bottom of the screen, only fullscreen toggle heals it. But when I recorded screencast, second time, I couldn't reproduce issue with wrong size, in previous try I had right-top part of airline behind the screen (expanded about 1 column) and bottom line behind the screen too. In TUI it's okay.
Hmm, ok, time to time I also can reproduce this, without timeout - this was much more times, but with timeout this also happens sometimes.
When launching neovim-gtk from terminal in tiling mode, it will consider the size of the previous instance, instead of the size of this instance's window. As a result of this, the airline-tabline on the top won't be shown unless I exit neovim-gtk and relaunch it to be on the exact same size as before. Furthermore, if I last opened it in a small tile, when I open it again in full screen mode, it will be shown as in the picture.![captura de pantalla de 2018-02-13 20-40-54](https://user-images.githubusercontent.com/11176122/36180233-4e16cad2-10fe-11e8-8a76-b7fef7a4bf9c.png)
I don't know if this error is related:
ERROR:<unknown>: Error while reading: I/O error while reading marker byte: failed to fill whole buffer
. It's shown every time I close with:q
.