aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-04-11 10:52:04 +0200
committerRobin Jarry <robin@jarry.cc>2023-04-15 17:27:10 +0200
commita9a590a833e2a1616a87b3b9e5fb982ebf8cf1ab (patch)
tree6a3dcc2934d61456dc8a1c20a5214e29895639bb /commands
parente641da83471bc3e70b31bfceac21933836a26eac (diff)
downloadaerc-a9a590a833e2a1616a87b3b9e5fb982ebf8cf1ab.tar.gz
term: update tab title even when tab is not selected
When a terminal widget title is updated, the screen is not redrawn. Only the UI state is invalidated so that on the next redraw, the title will be refreshed. Make sure that the screen is redrawn when the title changes. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'commands')
-rw-r--r--commands/term.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/term.go b/commands/term.go
index 5d0dd020..64657747 100644
--- a/commands/term.go
+++ b/commands/term.go
@@ -41,8 +41,10 @@ func TermCore(aerc *widgets.Aerc, args []string) error {
if title == "" {
title = args[1]
}
- tab.Name = title
- ui.Invalidate()
+ if tab.Name != title {
+ tab.Name = title
+ ui.QueueRedraw()
+ }
}
term.OnClose = func(err error) {
aerc.RemoveTab(term, false)