On grounds of popular request I want to extend my plugin so that people can add breakpoints by clicking on the margin. This is however already in use by the bookmark toggle. I decided to use a modifier (CTRL). Sadly the bookmark toggle does not check for modifiers, so even if I hold down CTRL, ALT, SHIFT in any combination, the bookmark still gets added. I was wondering if it were possible to add a line of code, so that bookmarks were toggled only in case where no modifiers were held down.
if (notification->modifiers == 0)
case SCN_MARGINCLICK:
...
else if (notification->margin == ScintillaEditView::_SC_MARGE_SYBOLE && !notification->modifiers)
{
int lineClick = int(_pEditView->execute(SCI_LINEFROMPOSITION, notification->position));
if (!showLines(lineClick))
bookmarkToggle(lineClick);
}
This leaves some space for other plugin developers.
Best regards.
-Zobo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Don.
On grounds of popular request I want to extend my plugin so that people can add breakpoints by clicking on the margin. This is however already in use by the bookmark toggle. I decided to use a modifier (CTRL). Sadly the bookmark toggle does not check for modifiers, so even if I hold down CTRL, ALT, SHIFT in any combination, the bookmark still gets added. I was wondering if it were possible to add a line of code, so that bookmarks were toggled only in case where no modifiers were held down.
if (notification->modifiers == 0)
case SCN_MARGINCLICK:
...
else if (notification->margin == ScintillaEditView::_SC_MARGE_SYBOLE && !notification->modifiers)
{
int lineClick = int(_pEditView->execute(SCI_LINEFROMPOSITION, notification->position));
if (!showLines(lineClick))
bookmarkToggle(lineClick);
}
This leaves some space for other plugin developers.
Best regards.
-Zobo
OK.
It'll be in v4.9.2
Don