documentor; extras/html: Made it easier to position caret at beginning or end of...
authorJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 06:08:57 +0000 (02:08 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 06:08:57 +0000 (02:08 -0400)
documentor/src/Documentor.ec
extras/html/lines.ec

index 80a995b..7dfc77e 100644 (file)
@@ -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;
index 7381e26..3623820 100644 (file)
@@ -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;