In most cases hotspots are used to open new files, and
as they are sent onmousedown it causes a selection to
occur if one clicks the hotspot. It makes more sense
to me to have it occur on onmouseup. The modified code is:
Editor.h:
Line 501 to void ButtonUp(Point pt, unsigned int
curTime, bool shift, bool ctrl, bool alt);
Editor.cxx:
Line 5456 add:
bool inSelMargin = PointInSelMargin(pt);
if(!inSelMargin && PointIsHotspot(pt))
{
int newPos = PositionFromLocation(pt);
newPos = MovePositionOutsideChar(newPos, currentPos -
newPos);
NotifyHotSpotClicked(newPos, shift, ctrl, alt);
}
Line 2229 remove:
if (PointIsHotspot(pt)) {
NotifyHotSpotClicked(newPos, shift, ctrl, alt);
}
ScintillaWin.cxx:
Line 678 to:
ButtonUp(Point::FromLong(lParam), ::GetMessageTime(),
(wParam & MK_SHIFT) != 0, (wParam & MK_CONTROL) != 0,
(wParam & MK_ALT) != 0);
I haven't modified this for GTK.
Cheers.
Logged In: NO
Sorry forgot to mention, I didn't include the code for
HOTSPOTDOUBLECLICK...should be obvious but I didn't write it
as my code only relies on HOTSPOTCLICK....thanks and sorry.
Logged In: YES
user_id=12579
Hotspots are also used for popping up definition windows.
This works best on mouse down. Any patch should introduce a
new event instead of changing the behaviour of the existing
event.
SCN_HOTSPOTRELEASECLICK added in 2.22.