Skip to content

Conversation

@silversquirl
Copy link
Contributor

This PR fixes two issues:

  1. window_range simply did not work correctly; it always reported 0 for the width for some reason
  2. changes to window_range would not update plugins that needed to redraw (eg. man.kak), because those plugins use WinResize.
    I've added code to trigger that hook when the window_range width/height changes - I briefly considered adding a new hook for it, but I think most things that want to know when the window resizes will also care about window_range resizes, and doing it this way means some plugins get bugfixes for free! (such as man.kak)

For some reason, it was simply reporting a width of 0 at all times!
This fixes an issue where man.kak would fail to update in some
situations. Specifically, if writing the man page to the buffer
increased the max line number enough to cause the gutter to grow, this
would change the available width, without triggering the resize hook
that re-layouts the manpage.
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
@mawww mawww merged commit 367ebc0 into mawww:master Oct 14, 2025
4 of 6 checks passed
@silversquirl silversquirl deleted the fix-window-range branch October 15, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants