From: Jerome St-Louis Date: Thu, 4 Aug 2016 06:08:57 +0000 (-0400) Subject: documentor; extras/html: Made it easier to position caret at beginning or end of... X-Git-Tag: 0.44.15~26 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=12cb9288a539df89d4b4e7bdb21cd78da2cd10e3 documentor; extras/html: Made it easier to position caret at beginning or end of text --- diff --git a/documentor/src/Documentor.ec b/documentor/src/Documentor.ec index 80a995b..7dfc77e 100644 --- a/documentor/src/Documentor.ec +++ b/documentor/src/Documentor.ec @@ -4229,7 +4229,7 @@ class HelpView : HTMLView if(setCaretX) caretX = sx; caretY = sy; - SetCaret(sx, sy, th); + SetCaret(sx-1, sy, th); { Point scrollPos = scroll; bool doScroll = false; diff --git a/extras/html/lines.ec b/extras/html/lines.ec index 7381e26..3623820 100644 --- a/extras/html/lines.ec +++ b/extras/html/lines.ec @@ -546,7 +546,8 @@ bool PickLine(HTMLView browser, Surface surface, int x, int y, int w, int h, Blo surface.TextExtent(block.text + textPos, len, &tw, &th); // eSurface_WriteText(surface, x, y + h - th, block.text + textPos, len); - if(pickX >= x && pickY >= y+h-th && pickX < x + tw && pickY < y+h) + if(block.text[0] == ' ' && block.text[1] == 0) pickX += tw; else + if(pickX >= x && pickY >= y+h-th && pickX < x + tw + 2 && pickY < y+h) { result = true; *pickBlock = block;