Repository navigation
Conversation
Super+J sent layoutmsg togglesplit unconditionally, which Hyprland rejects on a scrolling workspace. Dispatch consume_or_expel on scrolling instead.
Automated AI review
Outcome: SUPER + J does nothing for a lone window in the last scrolling column (per source), and the new test cannot fail. SUPER + J no-op on a scrolling edge
Suggested change: If DetailsSource: Suggested shape (checked only against a stubbed local result = hl.dispatch(hl.dsp.layout("consume_or_expel next"))
if result and result.ok == false then
hl.dispatch(hl.dsp.layout("consume_or_expel prev"))
endWhat would settle it live: in a Hyprland 0.56.2 session, open two windows on a scrolling workspace, press SUPER + J on the right-hand one, and check for "no adjacent column" in the log with the layout unchanged. The new test cannot failLine 7 runs Suggested change: Use Reproducer (passes at the merge-base and on a broken head)The new split-toggle test passes even when its assertions fail
Run with Lua 5.5.1 and bash, from the repository root of a clean checkout. Commits: PR head 1. Minimal interpreter behaviourlua <<'LUA'
assert(false, "assertion inside lua <<'LUA'")
LUA
echo "lua <<'LUA' exit=$?"
lua - <<'LUA'
assert(false, "assertion inside lua - <<'LUA'")
LUA
echo "lua - <<'LUA' exit=$?"stdout: stderr: 2. Break SUPER + J at the PR head: the test still passesAt the PR head: sed -i 's/consume_or_expel next/consume_or_expel prev/; s/(workspace.windows or 0) < 2/(workspace.windows or 0) < 0/' \
default/hypr/bindings/tiling.lua
bash test/shell.d/hyprland-window-split-toggle-test.sh; echo "exit=$?"stdout: stderr ( Same at the merge-base with only the new test file copied in (SUPER + J there is still bash test/shell.d/hyprland-window-split-toggle-test.sh; echo "exit=$?"stdout: stderr ( 3. With
|
|
Thanks for this. It fixes the same bug as #6924, which is older: both stop SUPER + J from sending dwindle's What this one adds beyond the fix is new behaviour: on scrolling, SUPER + J now runs
How this was checked: I read the diffs of #6924, #11863 and #12851 against |
Super + Jalways dispatched dwindle'stogglesplit. On a scrolling workspace Hyprland raisesno such layoutmsg for scrollingand shows a Lua runtime error overlay.The bind now checks the active (or special) workspace layout:
togglesplit(unchanged)consume_or_expel next(stack a lone column into its neighbor, or expel a stacked window)Testing
bash test/shell.d/hyprland-window-split-toggle-test.sh: passedbash test/shell.d/hyprland-binding-conflicts-test.sh: passed./test/cli: passedhyprctl configerrorsclean after reload; dispatching the new path on a one-window scrolling workspace no longer raises the Lua runtime error