dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
358 stars 6 forks source link

Possible issue between auto-remove frame feature and floating panes #50

Closed Maxito7 closed 3 months ago

Maxito7 commented 3 months ago

Describe the bug When opening a floating pane in a single-pane tab, if it is hidden and you open another pane next to your current one, the simplified border look will automatically be applied regardless if it's enabled or not.

To Reproduce Steps to reproduce the behavior:

  1. In a new Zellij session with zjstatus properly loaded, open a new floating pane.
  2. Hide the pane.
  3. Open a new side pane (next to or above/below the current one, shouldn't matter).
  4. The borders will have the simplified line-border look instead of having the more detailed bordered frame one.
  5. If you open the floating pane and exit it, the borders will automatically change the their detailed counterpart.

Expected behavior The expected behavior is that the panes should look simplified if the steps have been followed. It is important to note that if you first open a pane next to your current one and then open a floating pane the issue will not happen, so it's important to first open up the floating one.

Screenshots

Before closing the floating pane image After closing the floating pane image

Desktop (please complete the following information):

Layout

How does the layout look like? Please copy it into a code block.

layout {
    pane size=1 borderless=true {
      plugin location="file:${inputs.zjstatus.packages.${pkgs.system}.default}/bin/zjstatus.wasm" {
        format_left  "{mode}"
            format_center "{tabs}"
            format_right "#[bg=${blue},fg=${black},bold] {session} "
        format_space "#[bg=${black}]"

        border_enabled  "false"
        border_char     "─"
        border_format   "#[fg=${yellow}]{char}"
        border_position "top"

        hide_frame_for_single_pane "true"

            mode_normal "#[bg=${blue},fg=${black},bold] {name} "
            mode_locked "#[bg=${red},fg=${black},bold] {name} "
        mode_tab "#[bg=${green},fg=${black}] {name} "
            mode_pane "#[bg=${purple},fg=${black}] {name} "
            mode_session "#[bg=${orange},fg=${black}] {name} "
        mode_default_to_mode "normal"

        tab_normal   "#[bg=${black},fg=${light_purple}] {index} #[bg=${black},fg=${white}] {name} "
        tab_active   "#[bg=${purple},fg=${black}] {index} #[bg=${brightBlack},fg=${white},bold] {name} "
        tab_separator ""
      }
    }
  pane split_direction="vertical" {
        pane
    }
  }
dj95 commented 3 months ago

Hey, thanks again for the bug report! I fixed it in the latest commit. Feel free to test it with your nix setup :)

Otherwise the fix will be released with the next release.