From 83954cd5b58dc07d803d59280af2b477c4a87772 Mon Sep 17 00:00:00 2001 From: s4my Date: Mon, 30 Oct 2023 00:50:20 +0100 Subject: [PATCH] fix: making sure to not show the copy menu on the left margin otherwise we break the ability to disable/enable and delete breakpoints from the right-click menu on the margin. --- luigi2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luigi2.h b/luigi2.h index b595299..1be9c8a 100644 --- a/luigi2.h +++ b/luigi2.h @@ -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