diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-11-18 01:10:34 +0100 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-11-18 01:10:34 +0100 |
| commit | b6e364efeedd6466bba2f995c7a7976f7b54363e (patch) | |
| tree | 4a1bd3e2fe8c74099d0d7288b8e4a961c05abef6 | |
| parent | 71b1f095f7b1c337d52b60af071e970dee2400e1 (diff) | |
Curses: fixed displaying the popup with multi-line command lines
| -rw-r--r-- | src/interface-curses/curses-info-popup.c | 6 | ||||
| -rw-r--r-- | src/interface-gtk/interface.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/interface-curses/curses-info-popup.c b/src/interface-curses/curses-info-popup.c index 124453f..c51a99b 100644 --- a/src/interface-curses/curses-info-popup.c +++ b/src/interface-curses/curses-info-popup.c @@ -168,7 +168,7 @@ teco_curses_info_popup_show(teco_curses_info_popup_t *ctx, attr_t attr) * Popup window can cover all but one screen row. * Another row is reserved for the top border. */ - gint popup_lines = MIN(pad_lines + 1, LINES - 1); + gint popup_lines = MIN(pad_lines + 1, LINES - teco_cmdline.height); /* window covers message, scintilla and info windows */ ctx->window = newwin(popup_lines, 0, LINES - teco_cmdline.height - popup_lines, 0); @@ -262,7 +262,7 @@ void teco_curses_info_popup_scroll_page(teco_curses_info_popup_t *ctx) { gint pad_lines = getmaxy(ctx->pad); - gint popup_lines = MIN(pad_lines + 1, LINES - 1); + gint popup_lines = MIN(pad_lines + 1, LINES - teco_cmdline.height); /* progress scroll position */ ctx->pad_first_line += popup_lines - 1; @@ -277,7 +277,7 @@ void teco_curses_info_popup_scroll(teco_curses_info_popup_t *ctx, gint delta) { gint pad_lines = getmaxy(ctx->pad); - gint popup_lines = MIN(pad_lines + 1, LINES - 1); + gint popup_lines = MIN(pad_lines + 1, LINES - teco_cmdline.height); ctx->pad_first_line = MAX(ctx->pad_first_line+delta, 0); if (pad_lines - ctx->pad_first_line < popup_lines - 1) diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c index c09feb2..98c7266 100644 --- a/src/interface-gtk/interface.c +++ b/src/interface-gtk/interface.c @@ -218,7 +218,7 @@ teco_interface_init(void) /* * Overlay widget will allow overlaying the Scintilla view * and message widgets with the info popup. - * Therefore overlay_vbox (containing the view and popup) + * Therefore overlay_vbox (containing the view and message line) * will be the main child of the overlay. */ GtkWidget *overlay_widget = gtk_overlay_new(); |
