mirror of
https://github.com/textmate/textmate.git
synced 2026-01-20 20:27:59 -05:00
Reduce text overlap when showing context menu
This commit is contained in:
committed by
Allan Odgaard
parent
cc137f3c24
commit
6997fb820e
@@ -1637,7 +1637,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
CGRect r1 = layout->rect_at_index(editor->ranges().last().first);
|
||||
CGRect r2 = layout->rect_at_index(editor->ranges().last().last);
|
||||
CGRect r = r1.origin.y == r2.origin.y && r1.origin.x < r2.origin.x ? r1 : r2;
|
||||
NSPoint p = NSMakePoint(CGRectGetMinX(r), CGRectGetMaxY(r)-1);
|
||||
NSPoint p = NSMakePoint(CGRectGetMinX(r), CGRectGetMaxY(r)+4);
|
||||
if(NSPointInRect(p, [self visibleRect]))
|
||||
{ p = [[self window] convertBaseToScreen:[self convertPoint:p toView:nil]]; }
|
||||
else { p = [NSEvent mouseLocation]; p.y -= 16; }
|
||||
|
||||
Reference in New Issue
Block a user