diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-02-06 10:58:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-06 10:58:35 +0100 |
| commit | d45697a7f2416220dae69e73aac2ec32f6fd20b1 (patch) | |
| tree | b0232fe686f123ffb623997c7cfb1de9fb583873 /zellij-utils/src/plugin_api | |
| parent | fix: scrolling with double/triple-click selection (#4681) (diff) | |
| download | sl0ppij-d45697a7f2416220dae69e73aac2ec32f6fd20b1.tar.gz sl0ppij-d45697a7f2416220dae69e73aac2ec32f6fd20b1.tar.xz sl0ppij-d45697a7f2416220dae69e73aac2ec32f6fd20b1.zip | |
refactor: make tab_ids stable (#4685)
* refactor: clear distinction between tab_id and tab_position
* add tab_id to TabInfo
* add test
* rustfmt
* add pr
Diffstat (limited to 'zellij-utils/src/plugin_api')
| -rw-r--r-- | zellij-utils/src/plugin_api/event.proto | 1 | ||||
| -rw-r--r-- | zellij-utils/src/plugin_api/event.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/event.proto b/zellij-utils/src/plugin_api/event.proto index f5dadcb9..ff79d144 100644 --- a/zellij-utils/src/plugin_api/event.proto +++ b/zellij-utils/src/plugin_api/event.proto @@ -428,6 +428,7 @@ message TabInfo { uint32 display_area_columns = 14; uint32 selectable_tiled_panes_count = 15; uint32 selectable_floating_panes_count = 16; + uint32 tab_id = 17; } message ModeUpdatePayload { diff --git a/zellij-utils/src/plugin_api/event.rs b/zellij-utils/src/plugin_api/event.rs index 80d77e56..0fc31448 100644 --- a/zellij-utils/src/plugin_api/event.rs +++ b/zellij-utils/src/plugin_api/event.rs @@ -1605,6 +1605,7 @@ impl TryFrom<ProtobufTabInfo> for TabInfo { selectable_tiled_panes_count: protobuf_tab_info.selectable_tiled_panes_count as usize, selectable_floating_panes_count: protobuf_tab_info.selectable_floating_panes_count as usize, + tab_id: protobuf_tab_info.tab_id as usize, }) } } @@ -1633,6 +1634,7 @@ impl TryFrom<TabInfo> for ProtobufTabInfo { display_area_columns: tab_info.display_area_columns as u32, selectable_tiled_panes_count: tab_info.selectable_tiled_panes_count as u32, selectable_floating_panes_count: tab_info.selectable_floating_panes_count as u32, + tab_id: tab_info.tab_id as u32, }) } } @@ -2118,6 +2120,7 @@ fn serialize_tab_update_event_with_non_default_values() { display_area_columns: 10, selectable_tiled_panes_count: 10, selectable_floating_panes_count: 10, + tab_id: 0, }, TabInfo { position: 1, @@ -2136,6 +2139,7 @@ fn serialize_tab_update_event_with_non_default_values() { display_area_columns: 10, selectable_tiled_panes_count: 10, selectable_floating_panes_count: 10, + tab_id: 1, }, TabInfo::default(), ]); @@ -2409,6 +2413,7 @@ fn serialize_session_update_event_with_non_default_values() { display_area_columns: 10, selectable_tiled_panes_count: 10, selectable_floating_panes_count: 10, + tab_id: 0, }, TabInfo { position: 1, @@ -2427,6 +2432,7 @@ fn serialize_session_update_event_with_non_default_values() { display_area_columns: 10, selectable_tiled_panes_count: 10, selectable_floating_panes_count: 10, + tab_id: 1, }, TabInfo::default(), ]; |
