From d5be194b668793186b48cad3306efc21ab6804de Mon Sep 17 00:00:00 2001 From: Bart Trojanowski Date: Wed, 22 Oct 2008 21:31:23 -0400 Subject: [PATCH] better handling of regexp tags for Alt-Shift-R --- core/wmii.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/wmii.lua b/core/wmii.lua index ab67d66..ee00e4b 100644 --- a/core/wmii.lua +++ b/core/wmii.lua @@ -837,8 +837,19 @@ local key_handlers = { -- move selected client to a tag, and follow local tag = tag_menu() if tag then - write ("/client/sel/tags", tag) - set_view(tag) + -- get the current window id + local xid = wmixp:read("/client/sel/ctl") or "" + + -- modify the tag + write("/client/sel/tags", tag) + + -- if the client is still in this tag, then + -- it might have been a regexp tag... check + local test = wmixp:read("/client/sel/ctl") + if not test or test ~= xid then + -- if the window moved, follow it + set_view(tag) + end end end, ["Mod1-Control-t"] = function (key) -- 2.11.4.GIT