commit - fe2262ad3dcb66d88a03596bc884bd0d7e7af6e4
commit + e8a766656410c9dddec2d2d52503e07b49fa71eb
blob - a80fefd07819e4efc32f5c6a15929d2d8932dd72
blob + 8aa25d05c20943b9104193262145453470f005b4
--- ChangeLog
+++ ChangeLog
* ui.c (handle_resize): debounce resize event
(cmd_forward_char): unbreak forward-char
added aliases for tab-{next,new,previous}
+ (redraw_tabline): display a `!' when a non-focused tab gets loaded
2021-04-30 Omar Polo <op@omarpolo.com>
blob - 47f122b526bd916d3b444e48e4ccab5df2347ed7
blob + 37b06480d075ac61d8980db5ea3277a5f5286f19
--- ui.c
+++ ui.c
#include <unistd.h>
#define TAB_CURRENT 0x1
+#define TAB_URGENT 0x2
#define NEW_TAB_URL "about:new"
if ((t = TAILQ_NEXT(tab, tabs)) == NULL)
t = TAILQ_FIRST(&tabshead);
t->flags |= TAB_CURRENT;
+ t->flags &= ~TAB_URGENT;
}
static void
if ((t = TAILQ_PREV(tab, tabshead, tabs)) == NULL)
t = TAILQ_LAST(&tabshead, tabshead);
t->flags |= TAB_CURRENT;
+ t->flags &= ~TAB_URGENT;
}
static void
if (*(title = tab->window.page.title) == '\0')
title = tab->hist_cur->h;
- strlcpy(buf, " ", sizeof(buf));
+ if (tab->flags & TAB_URGENT)
+ strlcpy(buf, "!", sizeof(buf));
+ else
+ strlcpy(buf, " ", sizeof(buf));
+
if (strlcat(buf, title, sizeof(buf)) >= sizeof(buf)) {
/* truncation happens */
strlcpy(&buf[sizeof(buf)-4], "...", 4);
if (tab->flags & TAB_CURRENT) {
restore_cursor(&tab->window);
redraw_tab(tab);
- }
+ } else
+ tab->flags |= TAB_URGENT;
}
void