Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: at_edge has no effect for floating windows when float_win_behavior = 'mux' #217

Open
thenbe opened this issue Jun 27, 2024 · 0 comments · May be fixed by #218
Open

[Bug]: at_edge has no effect for floating windows when float_win_behavior = 'mux' #217

thenbe opened this issue Jun 27, 2024 · 0 comments · May be fixed by #218
Assignees
Labels
bug Something isn't working

Comments

@thenbe
Copy link
Contributor

thenbe commented Jun 27, 2024

Steps to Reproduce

opts.at_edge is not called when float_win_behavior = 'mux'

Minimal Reproduction

{
	float_win_behavior = 'mux',
	at_edge = function(context)
     	print('foo')
	end,
}
  1. Use the previous config.
  2. Open a floating window.
  3. Invoke the keymap that corresponds to move_cursor_right().
  4. .
    EXPECTED: foo should be printed
    ACTUAL: foo is not printed

Cause

Because we are returning early:

if handle_floating_window(function()
mux.move_pane(direction, true, at_edge)
end) then
return
end

We never reach the point where at_edge() is called:

Versions

nvim v0.10.0
kitty 0.35.1
@thenbe thenbe added the bug Something isn't working label Jun 27, 2024
@thenbe thenbe linked a pull request Jun 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants