diff options
| author | ruki <[email protected]> | 2018-01-02 00:27:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-01 20:47:32 +0800 |
| commit | 1bf42f883ad6c68ebc48c2b574233fb0fb27aecf (patch) | |
| tree | e1662089df98640e2b3c9c9f37e6d316ba5e735e /xmake/core/ui/program.lua | |
| parent | ff8b64effa9882573426f4d81f4b492d1328fba3 (diff) | |
fix cursor bug
Diffstat (limited to 'xmake/core/ui/program.lua')
| -rw-r--r-- | xmake/core/ui/program.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/ui/program.lua b/xmake/core/ui/program.lua index d8a5664a4..765d95732 100644 --- a/xmake/core/ui/program.lua +++ b/xmake/core/ui/program.lua @@ -380,7 +380,7 @@ function program:_refresh_cursor() end -- get the cursor position - local cursor = focused_view and focused_view:cursor() or point{0, 0} + local cursor = focused_view and focused_view:cursor()() or point{0, 0} if cursor_state ~= 0 then local v = focused_view while v:parent() do @@ -405,6 +405,9 @@ function program:_refresh_cursor() -- get main window local main_window = curses.main_window() + -- trace + log:print("cursor(%s): %s, %d", focused_view, cursor, cursor_state) + -- move cursor position if cursor_state ~= 0 then main_window:move(cursor.y, cursor.x) |
