From 5d7e8df952b2e51c28fad3443d7c9973659fc2ed Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 9 Nov 2025 19:26:37 +0100 Subject: allow configuring the command line height using h,5EJ * This allows for several customizations. * You can simply increase the visible command line history. For that you must also set SCI_SETWRAPMODE(SC_WRAP_CHAR). An example was added to fallback.teco_ini. * You could also set SCI_SETLINEENDTYPESALLOWED(SC_LINE_END_TYPE_DEFAULT) to see the structure of inserted text. * Alternatively we could have introduced a new command like EP or FW and also overload it to replace the current ED&2048 (e.g. -EP and EP). In DEC TECO `W` comes closest to what 5EJ now does. --- src/interface-gtk/interface.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/interface-gtk/interface.c') diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c index 665a635..c09feb2 100644 --- a/src/interface-gtk/interface.c +++ b/src/interface-gtk/interface.c @@ -782,8 +782,6 @@ teco_interface_set_css_variables(teco_view_t *view) guint32 calltip_fg_color = teco_view_ssm(view, SCI_STYLEGETFORE, STYLE_CALLTIP, 0); guint32 calltip_bg_color = teco_view_ssm(view, SCI_STYLEGETBACK, STYLE_CALLTIP, 0); - guint text_height = teco_cmdline_ssm(SCI_TEXTHEIGHT, 0, 0); - /* * Generates a CSS that sets some predefined color variables. * This effectively "exports" Scintilla styles into the CSS @@ -810,12 +808,13 @@ teco_interface_set_css_variables(teco_view_t *view) gtk_css_provider_load_from_data(teco_interface.css_var_provider, css, -1, NULL); /* - * The font and size of the commandline view might have changed, + * The font and size and height of the command-line view might have changed, * so we resize it. * This cannot be done via CSS or Scintilla messages. - * Currently, it is always exactly one line high in order to mimic the Curses UI. */ - gtk_widget_set_size_request(GTK_WIDGET(teco_cmdline.view), -1, text_height); + g_assert(teco_cmdline.height > 0); + gtk_widget_set_size_request(GTK_WIDGET(teco_cmdline.view), -1, + teco_cmdline.height*teco_cmdline_ssm(SCI_TEXTHEIGHT, 0, 0)); } static void @@ -1291,7 +1290,7 @@ static void teco_interface_cmdline_size_allocate_cb(GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { - teco_cmdline_resize(allocation->width); + teco_cmdline_resized(allocation->width); } static gboolean -- cgit v1.2.3