diff options
| author | iamcheeseman <[email protected]> | 2026-03-12 15:34:21 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-03-12 15:34:21 -0400 |
| commit | a73cc7bc2fb11f7099a59eafc73e2161bf807a84 (patch) | |
| tree | 5da51390d59b5e3df80b648783fc1dea4483a192 /src/im.lua | |
| parent | bea27cd7f979ce3544b4c73855190efc2a9565ac (diff) | |
fix silly lil bug causing mener to cry
Diffstat (limited to 'src/im.lua')
| -rw-r--r-- | src/im.lua | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -315,11 +315,13 @@ function im.begin_window(title, x, y, w, h, opts) end if mouse_down and focused_win == win then - local last = pop(wins) - wins[win.idx] = last - last.idx = win.idx - table.insert(wins, win) - win.idx = #wins + if wins[#wins] ~= win then + local last = table.remove(wins) + wins[win.idx] = last + last.idx = win.idx + table.insert(wins, win) + win.idx = #wins + end end end |
