Skip to content

Commit

Permalink
fix placing breakpoints in source margin
Browse files Browse the repository at this point in the history
  • Loading branch information
nakst committed Oct 28, 2023
1 parent ba90260 commit f33c563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luigi2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2882,11 +2882,11 @@ int _UICodeMessage(UIElement *element, UIMessage message, int di, void *dp) {
}
} else if (message == UI_MSG_LEFT_UP) {
UIElementAnimate(element, true);
} else if (message == UI_MSG_LEFT_DOWN && code->lineCount && (element->flags & UI_CODE_SELECTABLE)) {
} else if (message == UI_MSG_LEFT_DOWN && code->lineCount) {
int hitTest = UICodeHitTest(code, element->window->cursorX, element->window->cursorY);
code->leftDownInMargin = hitTest < 0;

if (hitTest > 0) {
if (hitTest > 0 && (element->flags & UI_CODE_SELECTABLE)) {
UICodePositionToByte(code, element->window->cursorX, element->window->cursorY, &code->selection[2].line, &code->selection[2].offset);
_UICodeMessage(element, UI_MSG_MOUSE_DRAG, di, dp);
UIElementFocus(element);
Expand Down

0 comments on commit f33c563

Please sign in to comment.