hl.bind(main_mod .. " + F", function() local window = hl.get_active_window() if window == nil then return end if type(window.layout) == "table" then -- Should only work on scrolling layout if window.layout.name == "scrolling" then local is_last = #window.workspace:get_windows() - 1 == window.layout.column.index --common:debug("Is last", is_last) local old_width = window.layout.column.width local new_width if old_width == 1.0 then new_width = hl.get_config("scrolling.column_width") else new_width = 1.0 end hl.dispatch(hl.dsp.layout("colresize " .. new_width)) if is_last and old_width == 1.0 then hl.dispatch(hl.dsp.layout("move -col")) end -- Set focus back to the original window hl.dispatch(hl.dsp.focus({ window = window })) end end end)