Neovide: Window Size Bug When Closing Maximized

by Alex Johnson 48 views

Hey there, Neovide users! We’ve got a little hiccup to discuss today, specifically around how Neovide window size behaves when you close the application while it’s maximized. It seems that Neovide, bless its heart, isn't quite remembering your preferred window dimensions if you happen to shut it down in a maximized state. This means when you reopen it, and then decide to restore it from its maximized glory, it doesn't pop back to the size you so carefully set. Let's dive into what's happening and why it might be a tad frustrating for some of you.

Understanding the Neovide Window Size Problem

The core of the issue lies in how Neovide handles window state persistence. Ideally, when you close an application, it should save its last known configuration, including window size and position, so that it reappears just as you left it. However, in this specific scenario, Neovide version 0.15.2 on Windows seems to falter. The bug description clearly outlines the steps: you open Neovide, you resize it to your liking, you maximize it, and then you close it. The expectation is that when you reopen Neovide, it should remember those custom dimensions. But alas, when you then restore it from being maximized, it reverts to an incorrect, almost default size, completely ignoring your carefully chosen settings. This is particularly irksome because, as noted, closing Neovide from a non-maximized state works perfectly fine. The window size is saved, and it restores beautifully. It's only when the application is closed while maximized that this Neovide window size anomaly occurs.

This might seem like a minor inconvenience, but for users who have specific workflows or screen real estate they like to dedicate to their coding environment, having the window size reset can be a regular annoyance. It interrupts the flow, requiring you to manually resize the window every single time you start Neovide after closing it from a maximized state. The expected behavior is straightforward: save the last non-maximized dimensions, even if the application was closed while maximized. This would ensure that upon restoring the window, it gracefully returns to the user-defined size, providing a seamless experience. The logs provided (neovide_rCURRENT.log) would likely offer more technical insights into how the window state is being managed and where the saving or restoring process might be going awry. For now, we're focusing on the user-facing impact of this Neovide window size bug.

Steps to Reproduce the Neovide Window Size Glitch

To truly appreciate and understand this bug, it's best to walk through the exact steps that trigger the unexpected behavior. This will help clarify the conditions under which the Neovide window size fails to persist. Let's break it down:

  1. Open a Neovide window: Start Neovide in its usual, normal or restored state. This is your baseline. You haven't yet interacted with the maximization feature.
  2. Manually resize the window: This is a crucial step. You’ll want to adjust the window borders to your preferred dimensions. Maybe you like it wide and short, or perhaps tall and narrow. Whatever your ideal custom window dimensions are, set them now. This is the size Neovide should remember.
  3. Maximize the window: Now, click the maximize button or use your operating system's shortcut to make the Neovide window fill the entire screen. It’s important to note that while maximized, Neovide is occupying the full screen, and its specific dimensions aren't directly controllable in the same way as a restored window.
  4. Close Neovide while maximized: With the window still in its maximized state, proceed to close the application. This is the critical action that seems to confuse Neovide's state-saving mechanism.
  5. Re-open Neovide: Launch Neovide again. As expected, it will likely open in the maximized state, mirroring how you left it.
  6. Restore the window: Now, click the restore button (or use the equivalent shortcut) to bring the window back to its previous, non-maximized size. Here's where the bug manifests: Instead of returning to the custom dimensions you set in step 2, the window snaps to an incorrect or default size. It's not the size you wanted, and it's not the size it was before you maximized it.

This sequence of events highlights a specific failure in the persistence logic. The application correctly handles closing from a restored state, but the transition through maximization and then closing seems to corrupt or overwrite the saved window size information. The expected behavior is that Neovide should always preserve your last manually set dimensions, and when you restore from a maximized state, it should revert to those saved dimensions, not some arbitrary default. This bug directly impacts the user experience by forcing them to constantly re-adjust their window size, which is especially frustrating for those who rely on consistent window layouts for their development environment.

The Contrast: Correct Neovide Window Size Behavior

To fully understand what's going wrong, it's helpful to contrast the buggy behavior with how Neovide should be working, and indeed, how it does work under slightly different conditions. The developers have helpfully provided a scenario where the Neovide window size persistence functions as intended, which emphasizes that the issue is isolated to the