Problem: On startup the GUI window is the height of the window decorations
too small, so it shows two lines less than 'lines'. It only gets
the right size after the first pointer event.
Solution: Also request the shell size on the form widget, so that GTK derives
the window height from it with the decorations included. Drop the
request again once the size was given, so that the window can still
be made smaller.
related: #21021
related: #21016
What was confirmed while working on this:
gtk_window_set_default_size() in gui_mch_open() cannot dogui.decor_height is still 0 at that point, so it asks for thegtk_window_present(). The property doesgtk_window_set_default_size() made right after gtk_window_present() isgtk_widget_queue_resize() on the window does not help either.:set lines and :set columns resize the windowgtk_window_set_default_size() as expected. The problem is limitedgui.decor_height is not needed to get the first size right.set_form_size() must do nothing whengui_init() calls gui_set_shellsize() with the same size rightgui_mch_open(), so this happens on every startup.Tested: starts with 80x24, +"set columns=120" opens with 120 columns,
:set lines and :set columns work in both directions, the window can be
resized with the mouse in every direction right after startup.
https://github.com/vim/vim/pull/21045
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman
I was originally planning to leave this to you, but I was curious myself and did some trial and error. After gathering various facts and reaching a better state than the current implementation, I've opened a PR. Could you review it? If you already have a solution that you're satisfied with, I'm happy to withdraw this PR.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()