From 6ec51952d0593d414498a507c53b227ab88dfa64 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Wed, 1 Sep 2021 16:43:42 +0200 Subject: [PATCH] fix(tabs): force render by index rather than by position (#684) * fix(tabs): force render by index rather than by position * docs(changelog): document change --- CHANGELOG.md | 2 ++ zellij-server/src/screen.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da63b00..11a74967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +* Fix bug when opening new tab the new pane's viewport would sometimes be calculated incorrectly (https://github.com/zellij-org/zellij/pull/683) +* Fix bug when in some cases closing a tab would not clear the previous pane's contents (https://github.com/zellij-org/zellij/pull/684) ## [0.16.0] - 2021-08-31 * Plugins don't crash zellij anymore on receiving mouse events (https://github.com/zellij-org/zellij/pull/620) diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 432b15fc..d751f81c 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -266,7 +266,7 @@ impl Screen { } else { self.active_tab_index = self.tab_history.pop().unwrap(); for t in self.tabs.values_mut() { - if t.position == self.active_tab_index.unwrap() { + if t.index == self.active_tab_index.unwrap() { t.set_force_render() } if t.position > active_tab.position {