dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit d6fc319cc2bc6da832fa0330420b84b08bfa589c
parent 10e4db210f33661a429a7ce6d0f1f721ffc244f1
Author: Frank LENORMAND <lenormf@gmail.com>
Date:   Sun,  2 Oct 2016 16:17:10 +0300

Compare full tag names, and assign them to not only visible windows

Since tags can be set to strings longer than the default one byte long
digits, we need to compare the whole strings and not only the first
character.

Assigning a tag should not depend on the visibility of a window, so we
loop over all the clients (as opposed to only the visible ones).

Diffstat:
dvtm.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -770,7 +770,7 @@ keybinding(KeyCombo keys, unsigned int keycount) { static unsigned int bitoftag(const char *tag) { unsigned int i; - for (i = 0; (i < LENGTH(tags)) && (*tags[i] != *tag); i++); + for (i = 0; (i < LENGTH(tags)) && strcmp(tags[i], tag); i++); return (i < LENGTH(tags)) ? (1 << i) : ~0; } @@ -804,7 +804,7 @@ tagid(const char *args[]) { return; const int win_id = atoi(args[0]); - for (Client *c = nextvisible(clients); c; c = nextvisible(c->next)) { + for (Client *c = clients; c; c = c->next) { if (c->id == win_id) { c->tags = bitoftag(args[1]) & TAGMASK; tagschanged();