degesch: enforce fullscreen buffers

Probably long overdue.

Now we actually look like something resembling a regular IRC client.
This commit is contained in:
Přemysl Eric Janouch 2016-01-15 05:08:54 +01:00
parent 9333081178
commit d0db1a6cdc
2 changed files with 6 additions and 12 deletions

2
NEWS
View File

@ -2,6 +2,8 @@
* Use TLS Server Name Indication when connecting to servers * Use TLS Server Name Indication when connecting to servers
* degesch: now we erase the screen before displaying buffers
* degesch: added autocomplete for /topic * degesch: added autocomplete for /topic
* degesch: resolve remote addresses asynchronously * degesch: resolve remote addresses asynchronously

View File

@ -1514,7 +1514,6 @@ struct app_context
char *attrs[ATTR_COUNT]; ///< Terminal attributes char *attrs[ATTR_COUNT]; ///< Terminal attributes
bool isolate_buffers; ///< Isolate global/server buffers bool isolate_buffers; ///< Isolate global/server buffers
bool beep_on_highlight; ///< Beep on highlight bool beep_on_highlight; ///< Beep on highlight
bool fullscreen_buffers; ///< Buffers take the whole screen
bool logging; ///< Logging to file enabled bool logging; ///< Logging to file enabled
bool show_all_prefixes; ///< Show all prefixes before nicks bool show_all_prefixes; ///< Show all prefixes before nicks
@ -1715,7 +1714,6 @@ static void on_config_logging_change (struct config_item *item);
} }
TRIVIAL_BOOLEAN_ON_CHANGE (isolate_buffers) TRIVIAL_BOOLEAN_ON_CHANGE (isolate_buffers)
TRIVIAL_BOOLEAN_ON_CHANGE (fullscreen_buffers)
TRIVIAL_BOOLEAN_ON_CHANGE (beep_on_highlight) TRIVIAL_BOOLEAN_ON_CHANGE (beep_on_highlight)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1876,11 +1874,6 @@ static struct config_schema g_config_behaviour[] =
.type = CONFIG_ITEM_BOOLEAN, .type = CONFIG_ITEM_BOOLEAN,
.default_ = "off", .default_ = "off",
.on_change = on_config_isolate_buffers_change }, .on_change = on_config_isolate_buffers_change },
{ .name = "fullscreen_buffers",
.comment = "Space above buffer contents is filled with whitespace",
.type = CONFIG_ITEM_BOOLEAN,
.default_ = "off",
.on_change = on_config_fullscreen_buffers_change },
{ .name = "beep_on_highlight", { .name = "beep_on_highlight",
.comment = "Beep when highlighted or on a new invisible PM", .comment = "Beep when highlighted or on a new invisible PM",
.type = CONFIG_ITEM_BOOLEAN, .type = CONFIG_ITEM_BOOLEAN,
@ -3412,11 +3405,11 @@ buffer_print_backlog (struct app_context *ctx, struct buffer *buffer)
// That is, minus the readline prompt // That is, minus the readline prompt
int display_limit = MAX (10, g_terminal.lines - 1); int display_limit = MAX (10, g_terminal.lines - 1);
terminal_printer_fn printer = get_attribute_printer (stdout); // Simulate curses-like fullscreen buffers if the terminal allows it
if (ctx->fullscreen_buffers) if (clear_screen)
{ {
if (soft_assert (clear_screen)) terminal_printer_fn printer = get_attribute_printer (stdout);
tputs (clear_screen, 1, printer); tputs (clear_screen, 1, printer);
if (cursor_to_ll) if (cursor_to_ll)
tputs (cursor_to_ll, 1, printer); tputs (cursor_to_ll, 1, printer);
else if (row_address) else if (row_address)
@ -3432,7 +3425,6 @@ buffer_print_backlog (struct app_context *ctx, struct buffer *buffer)
iconv_xstrdup (ctx->term_from_utf8, buffer->name, -1, NULL); iconv_xstrdup (ctx->term_from_utf8, buffer->name, -1, NULL);
print_status ("%s", buffer_name_localized); print_status ("%s", buffer_name_localized);
free (buffer_name_localized); free (buffer_name_localized);
display_limit--;
} }
struct buffer_line *line = buffer->lines_tail; struct buffer_line *line = buffer->lines_tail;