Skip to content

Commit

Permalink
add wrap() utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Apr 19, 2023
1 parent 854d125 commit c677a76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ require('smart-splits').setup({
-- },
-- direction = 'left'|'right'|'up'|'down',
-- split(), -- utility function to split current Neovim pane in the current direction
-- wrap(), -- utility function to wrap to opposite Neovim pane
-- }
-- NOTE: `at_edge = 'wrap'` is not supported on Kitty terminal
-- multiplexer, as there is no way to determine layout via the CLI
Expand Down
3 changes: 3 additions & 0 deletions lua/smart-splits/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ local function move_cursor(direction, opts)
split = function()
split_edge(direction)
end,
wrap = function()
next_win_or_wrap(will_wrap, DirectionKeysReverse[direction])
end,
}
at_edge(ctx)
return
Expand Down

0 comments on commit c677a76

Please sign in to comment.