From dc36e6142222767f3260f4f488ee7a1792c8078c Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Tue, 17 Apr 2012 18:05:12 +0800 Subject: [PATCH] put cursor on the left of first word --- unireader.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/unireader.lua b/unireader.lua index b8d5b21d9..ad8125e10 100644 --- a/unireader.lua +++ b/unireader.lua @@ -501,6 +501,7 @@ function UniReader:startHighLightMode() return end + w.start = 0 l.cur, w.cur = l.start, w.start l.new, w.new = l.cur, w.cur local is_meet_start = false @@ -508,13 +509,13 @@ function UniReader:startHighLightMode() local running = true local cx, cy, cw, ch = self:getRectInScreen( - t[l.cur][w.cur].x0, - t[l.cur][w.cur].y0, - t[l.cur][w.cur].x1, - t[l.cur][w.cur].y1) + t[l.cur][1].x0, + t[l.cur][1].y0, + t[l.cur][1].x1, + t[l.cur][1].y1) self.cursor = Cursor:new { - x_pos = cx+cw, + x_pos = cx, y_pos = cy, h = ch, line_width_factor = 4,