diff options
author | NRK <nrk@disroot.org> | 2023-11-13 11:45:49 +0100 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2023-11-13 11:45:49 +0100 |
commit | bed596bf47a1571639aa1427dbdd57f00ed0503e (patch) | |
tree | f0ff5bf67019a82430815ec8c9e85145f5caaec8 | |
parent | 70cbe59daa319ff71afeb84444dff7d3fdfadbdb (diff) | |
download | nsxiv-bed596bf47a1571639aa1427dbdd57f00ed0503e.tar.zst |
move key-handler prompts to the right bar (#481)
this makes it more consistent with e4fceab by moving the key-handler
related messages to the right side as well.
additionally this fixes a regression introduced by 3659361 where the
left statusbar would remain at "Running key-handler..." if the image
didn't change.
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/481
Reviewed-by: eylles <eylles@noreply.codeberg.org>
-rw-r--r-- | main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -601,12 +601,10 @@ void handle_key_handler(bool init) if (win.bar.h == 0) return; if (init) { - close_info(); - snprintf(win.bar.l.buf, win.bar.l.size, + snprintf(win.bar.r.buf, win.bar.r.size, "Getting key handler input (%s to abort)...", XKeysymToString(KEYHANDLER_ABORT)); } else { /* abort */ - open_info(); update_info(); } win_draw(&win); @@ -635,8 +633,7 @@ static bool run_key_handler(const char *key, unsigned int mask) if (key == NULL) return false; - close_info(); - strncpy(win.bar.l.buf, "Running key handler...", win.bar.l.size); + strncpy(win.bar.r.buf, "Running key handler...", win.bar.r.size); win_draw(&win); win_set_cursor(&win, CURSOR_WATCH); setenv("NSXIV_USING_NULL", options->using_null ? "1" : "0", 1); @@ -687,6 +684,8 @@ static bool run_key_handler(const char *key, unsigned int mask) if (mode == MODE_IMAGE && changed) { img_close(&img, true); load_image(fileidx); + } else { + update_info(); } free(oldst); reset_cursor(); |