smart-splits.nvim icon indicating copy to clipboard operation
smart-splits.nvim copied to clipboard

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

Open thenbe opened this issue 1 year ago • 0 comments

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: https://github.com/mrjones2014/smart-splits.nvim/blob/9a6cd461000e518be35ae830e46695e9b8b4c315/lua/smart-splits/api.lua#L359-L363

We never reach the point where at_edge() is called: https://github.com/mrjones2014/smart-splits.nvim/blob/9a6cd461000e518be35ae830e46695e9b8b4c315/lua/smart-splits/api.lua#L393

Versions

nvim v0.10.0
kitty 0.35.1

thenbe avatar Jun 27 '24 00:06 thenbe