aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/worker.go
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2023-08-02 21:06:47 +0200
committerRobin Jarry <robin@jarry.cc>2023-08-03 22:28:07 +0200
commit2fbce2e2c9aa782cc3d99a7232d78876b835e513 (patch)
treed3748edf1573b9c460efd729e833fdb8886539b2 /worker/imap/worker.go
parent6713a8f4588f26f46c3e5fe0a69ead0f345617f3 (diff)
downloadaerc-2fbce2e2c9aa782cc3d99a7232d78876b835e513.tar.gz
mouse: fix offset in tab title clickable area
Since templates have been introduced into the tab titles the clickable area has been offset from the actual title. This is because the clickable areas are calculated based on the tab names, which can now be different from the acually shown titles. Extract the logic of getting the display name of a tab from TabStrip and add as method of Tab. Also extract the magic constant 32. Use the method and const in both clicked and Draw. Switch from using len() to runewidth, when calculating the length of the display name. Fixes: https://todo.sr.ht/~rjarry/aerc/162 Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'worker/imap/worker.go')
0 files changed, 0 insertions, 0 deletions