aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-01-04 21:11:06 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-01-04 22:31:50 +0100
commitf356d76752c59bef8e4034e759226ab36c8a1a62 (patch)
tree37b1563fce1470d4008bdb21bd1498180ebaac1e /config.def.h
parentd9f1a640d84054c5bcc513e0cbe34aad77c167bc (diff)
downloadvis-f356d76752c59bef8e4034e759226ab36c8a1a62.tar.gz
vis-f356d76752c59bef8e4034e759226ab36c8a1a62.tar.xz
Change window_cursor_getxy API
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h5
1 files changed, 2 insertions, 3 deletions
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);