From f356d76752c59bef8e4034e759226ab36c8a1a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 4 Jan 2015 21:11:06 +0100 Subject: Change window_cursor_getxy API --- config.def.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index cfd1771..0ca896b 100644 --- a/config.def.h +++ b/config.def.h @@ -69,9 +69,8 @@ static Command cmds[] = { /* draw a statubar, do whatever you want with win->statuswin curses window */ static void statusbar(EditorWin *win) { - size_t line, col; bool focused = vis->win == win || vis->prompt->editor == win; - window_cursor_getxy(win->win, &line, &col); + CursorPos pos = window_cursor_getpos(win->win); wattrset(win->statuswin, focused ? A_REVERSE|A_BOLD : A_REVERSE); mvwhline(win->statuswin, 0, 0, ' ', win->width); mvwprintw(win->statuswin, 0, 0, "%s %s %s %s", @@ -80,7 +79,7 @@ static void statusbar(EditorWin *win) { text_modified(win->text) ? "[+]" : "", vis->recording ? "recording": ""); char buf[win->width + 1]; - int len = snprintf(buf, win->width, "%zd, %zd", line, col); + int len = snprintf(buf, win->width, "%zd, %zd", pos.line, pos.col); if (len > 0) { buf[len] = '\0'; mvwaddstr(win->statuswin, 0, win->width - len - 1, buf); -- cgit v1.2.3