From 1bf42f883ad6c68ebc48c2b574233fb0fb27aecf Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 2 Jan 2018 00:27:55 +0800 Subject: fix cursor bug --- xmake/core/ui/program.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xmake/core/ui/program.lua') 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) -- cgit v1.3.1