cex

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.wimdupont.com/cex.git
Log | Files | Refs | LICENSE

commit 7a60f15a107452cbe409b478b690ab3f78cc8b0c
parent 187065c549a5915e527065e32ced7c04be0ae985
Author: Wim Dupont <wim@wimdupont.com>
Date:   Thu, 25 Jul 2024 22:56:05 +0200

improve prints

Diffstat:
Mcex.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/cex.c b/cex.c @@ -669,11 +669,11 @@ show_file_mime() char buf[MIME_MAX]; if (get_mime(buf, MIME_MAX, curwin.winfiles[curwin.highlight].d_name) != 0) - return; + cpstr(buf, "Can't retrieve mime."); move(1, 1); clrtoeol(); - mvprintw(1, 1, "%s", buf); + addstr(buf); } static void @@ -683,7 +683,7 @@ combo_key(int keypress) move(maxy-1, maxx-1); clrtoeol(); - mvaddch(maxy-1, maxx-1, keypress); + addch(keypress); halfdelay(10); @@ -853,7 +853,7 @@ open_child() if (get_mime(mime, MIME_MAX, curwin.winfiles[curwin.highlight].d_name) != 0) { move(1, 1); clrtoeol(); - mvprintw(1, 1, "Can\'t open %s", curwin.winfiles[curwin.highlight].d_name); + printw("Can\'t open %s", curwin.winfiles[curwin.highlight].d_name); return; } @@ -862,7 +862,7 @@ open_child() if (!istext && get_mime_default(mimedefault, MIME_APP_MAX, mime) != 0) { move(1, 1); clrtoeol(); - mvprintw(1, 1, "Can\'t open for mime %s", mime); + printw("Can\'t open for mime %s", mime); return; } @@ -1085,7 +1085,7 @@ prompt_answer(char *buf, size_t size, const char *question) clrtoeol(); attron(COLOR_PAIR(PROMPT_COLOR)); - printw(question); + addstr(question); attroff(COLOR_PAIR(PROMPT_COLOR)); echo();