Skip to content

Commit 3906462

Browse files
committed
Fix remaining tab crash from not clearing tracking tags correctly
Similar to #1334. The old PSMTabBarControl code has a lot of dubious straggling states regarding the tracking tags. Seems like previous macOS versions tolerated that but in the newer macOS versions, the tags seem to be reused for other purposes and so when you double-remove the tags, you get into trouble. Related to #1333
1 parent b2dacc5 commit 3906462

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m

+4
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,11 @@ - (void)removeTabForCell:(PSMTabBarCell *)cell
476476
[[NSNotificationCenter defaultCenter] removeObserver:cell];
477477
if([cell closeButtonTrackingTag] != 0){
478478
[self removeTrackingRect:[cell closeButtonTrackingTag]];
479+
[cell setCloseButtonTrackingTag:0];
479480
}
480481
if([cell cellTrackingTag] != 0){
481482
[self removeTrackingRect:[cell cellTrackingTag]];
483+
[cell setCellTrackingTag:0];
482484
}
483485

484486
// pull from collection
@@ -665,9 +667,11 @@ - (void)update
665667
[[NSNotificationCenter defaultCenter] removeObserver:cell];
666668
if([cell closeButtonTrackingTag] != 0){
667669
[self removeTrackingRect:[cell closeButtonTrackingTag]];
670+
[cell setCloseButtonTrackingTag:0];
668671
}
669672
if([cell cellTrackingTag] != 0){
670673
[self removeTrackingRect:[cell cellTrackingTag]];
674+
[cell setCellTrackingTag:0];
671675
}
672676
}
673677

0 commit comments

Comments
 (0)