Index: TabBar.cpp =================================================================== --- TabBar.cpp (revision 11187) +++ TabBar.cpp (working copy) @@ -453,16 +453,19 @@ void TabBar::ContextMenu(Bar& bar) { - if (GetCursor() >= 0 && crosses) { - bar.Add(tabs.GetCount() > mintabcount, t_("Close"), THISBACK2(Close, highlight, true)); + if(highlight > -1){ + if (GetCursor() >= 0 && crosses) { + bar.Add(tabs.GetCount() > mintabcount, t_("Close"), THISBACK2(Close, highlight, true)); + } + int ii = GetHighlight(); // Need copy to freeze it, [=] copies 'this' and thus reference to highlight + if (ii >= 0 && crosses) + bar.Add(t_("Close others"), [=] { CloseAll(ii); }); + if (ii < GetCount() - 1 && crosses) + bar.Add(t_("Close right tabs"), [=] { CloseAll(-1, ii + 1); }); + if (mintabcount <= 0 && crosses) + bar.Add(t_("Close all"), [=] { CloseAll(-1); }); } - int ii = GetHighlight(); // Need copy to freeze it, [=] copies 'this' and thus reference to highlight - if (ii >= 0 && crosses) - bar.Add(t_("Close others"), [=] { CloseAll(ii); }); - if (ii < GetCount() - 1 && crosses) - bar.Add(t_("Close right tabs"), [=] { CloseAll(-1, ii + 1); }); - if (mintabcount <= 0 && crosses) - bar.Add(t_("Close all"), [=] { CloseAll(-1); }); + if(grouping) { if(group > 0) bar.Add(t_("Close group"), THISBACK(CloseGroup));