dj95 / zjstatus

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

status bar goes out of bound if the tab passed the center of the window #45

Closed benzwt closed 4 months ago

benzwt commented 4 months ago

Describe the bug The status bar will goes out of bound if the tab passed the center of the window (v0.13.0). Things work fine in v0.12.0(without format_center).

To Reproduce I reproduced the error using the slanted.kdl from the repos.

Expected behavior The status bar shouldn't go out bound, in any circumstances.

Screenshots output

Desktop (please complete the following information):

Layout

layout {
    pane split_direction="vertical" {
        pane
    }

    pane size=1 borderless=true {
        plugin location="file:target/wasm32-wasi/debug/zjstatus.wasm" {
            format_left  "{mode}#[fg=black,bg=blue,bold]{session}  #[fg=blue,bg=#181825]{tabs}"
            format_right "#[fg=#181825,bg=#b1bbfa]{datetime}"
            format_space "#[bg=#181825]"

            hide_frame_for_single_pane "true"

            mode_normal  "#[bg=blue] "

            tab_normal              "#[fg=#181825,bg=#4C4C59] #[fg=#000000,bg=#4C4C59]{index}  {name} #[fg=#4C4C59,bg=#181825]"
            tab_normal_fullscreen   "#[fg=#6C7086,bg=#181825] {index} {name} [] "
            tab_normal_sync         "#[fg=#6C7086,bg=#181825] {index} {name} <> "
            tab_active              "#[fg=#181825,bg=#ffffff,bold,italic] {index}  {name} #[fg=#ffffff,bg=#181825]"
            tab_active_fullscreen   "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} [] "
            tab_active_sync         "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} <> "

            datetime          "#[fg=#6C7086,bg=#b1bbfa,bold] {format} "
            datetime_format   "%A, %d %b %Y %H:%M"
            datetime_timezone "Europe/Berlin"
        }
    }
}
dj95 commented 4 months ago

Hey,

thanks a lot for the bug report. It's fixed now in v0.13.1