Skip to content

Commit

Permalink
fix: making sure to not show the copy menu on the left margin otherwise
Browse files Browse the repository at this point in the history
we break the ability to disable/delete breakpoints from the right-click
menu on the margin.
  • Loading branch information
s4my committed Oct 29, 2023
1 parent b587481 commit 1b4d307
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion luigi2.h
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,9 @@ int _UICodeMessage(UIElement *element, UIMessage message, int di, void *dp) {

return 1;
} else if (message == UI_MSG_RIGHT_DOWN) {
if (element->flags & UI_CODE_SELECTABLE) {
int hitTest = UICodeHitTest(code, element->window->cursorX, element->window->cursorY);

if (hitTest > 0 && (element->flags & UI_CODE_SELECTABLE)) {
UIElementFocus(element);
UIMenu *menu = UIMenuCreate(&element->window->e, UI_MENU_NO_SCROLL);
UIMenuAddItem(menu, (code->selection[0].line == code->selection[1].line
Expand Down

0 comments on commit 1b4d307

Please sign in to comment.