Skip to content

Commit

Permalink
Fix computation of new tag index with cached one
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisBRENON committed May 14, 2015
1 parent 215562f commit 6f91324
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local awful = require("awful")
local wibox = require("wibox")
local pairs = pairs
local io = io
local math = math
local tonumber = tonumber
local dbg= dbg
local capi = {
Expand Down Expand Up @@ -339,7 +340,7 @@ function set(t, args)
idx = pos2idx(props.position, scr)
if t_idx and t_idx < idx then idx = idx - 1 end
elseif shifty.config.remember_index and index_cache[scr][t.name] then
idx = index_cache[scr][t.name]
idx = math.min(index_cache[scr][t.name], #tags+1)
elseif not t_idx then
idx = #tags + 1
end
Expand Down

0 comments on commit 6f91324

Please sign in to comment.