diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 12:44:25 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 12:44:25 +0200 |
| commit | 49196eba130b3ab4f0939f13d071aef3d0a70eab (patch) | |
| tree | 4d3f5d95dac9a8d01677ed66245f18796c63f695 /editor.c | |
| parent | e46158f31369b8b16ed9ea3885b9def08afc4a55 (diff) | |
| download | vis-49196eba130b3ab4f0939f13d071aef3d0a70eab.tar.gz vis-49196eba130b3ab4f0939f13d071aef3d0a70eab.tar.xz | |
Simplify drawing of the window statusbar
Diffstat (limited to 'editor.c')
| -rw-r--r-- | editor.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -47,19 +47,15 @@ static void editor_window_move(EditorWin *win, int x, int y) { } static void editor_window_statusbar_draw(EditorWin *win) { - size_t line, col; - if (win->statuswin && win->editor->statusbar) { - window_cursor_getxy(win->win, &line, &col); - win->editor->statusbar(win->statuswin, win->editor->win == win, - text_filename(win->text), line, col); - } + if (win->statuswin && win->editor->statusbar) + win->editor->statusbar(win); } static void editor_window_cursor_moved(Win *win, void *data) { editor_window_statusbar_draw(data); } -void editor_statusbar_set(Editor *ed, editor_statusbar_t statusbar) { +void editor_statusbar_set(Editor *ed, void (*statusbar)(EditorWin*)) { ed->statusbar = statusbar; } |
