fix: curtag overflow when view arg is -1 in view dispatch

This commit is contained in:
DreamMaoMao
2025-12-03 09:29:14 +08:00
parent 559de3c66b
commit 068ec120de

View File

@@ -5639,9 +5639,9 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m,
} }
if (arg->ui == UINT32_MAX) { if (arg->ui == UINT32_MAX) {
m->pertag->prevtag = m->tagset[m->seltags]; m->pertag->prevtag = get_tags_first_tag_num(m->tagset[m->seltags]);
m->seltags ^= 1; /* toggle sel tagset */ m->seltags ^= 1; /* toggle sel tagset */
m->pertag->curtag = m->tagset[m->seltags]; m->pertag->curtag = get_tags_first_tag_num(m->tagset[m->seltags]);
goto toggleseltags; goto toggleseltags;
} }