Skip to content

Commit f6fcb79

Browse files
committed
fix(api): Rename function for consistency
1 parent 5c18899 commit f6fcb79

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ vim.keymap.set('n', '<C-h>', require('smart-splits').move_cursor_left)
251251
vim.keymap.set('n', '<C-j>', require('smart-splits').move_cursor_down)
252252
vim.keymap.set('n', '<C-k>', require('smart-splits').move_cursor_up)
253253
vim.keymap.set('n', '<C-l>', require('smart-splits').move_cursor_right)
254+
vim.keymap.set('n', '<C-\\>', require('smart-splits').move_cursor_previous)
254255
-- swapping buffers between windows
255256
vim.keymap.set('n', '<leader><leader>h', require('smart-splits').swap_buf_left)
256257
vim.keymap.set('n', '<leader><leader>j', require('smart-splits').swap_buf_down)
@@ -279,6 +280,7 @@ require('smart-splits').move_cursor_up({ same_row = boolean, at_edge = 'wrap' |
279280
require('smart-splits').move_cursor_down()
280281
require('smart-splits').move_cursor_left()
281282
require('smart-splits').move_cursor_right()
283+
require('smart-splits').move_cursor_previous()
282284
-- Swapping buffers directionally with the window to the specified direction
283285
require('smart-splits').swap_buf_up()
284286
require('smart-splits').swap_buf_down()

lua/smart-splits/api.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ end, {
490490
Direction.down,
491491
})
492492

493-
function M.move_cursor_previous_win()
493+
function M.move_cursor_previous()
494494
local win = mux_utils.get_previous_win()
495495
if win then
496496
vim.api.nvim_set_current_win(win)

lua/smart-splits/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ end, {
2121
Direction.down,
2222
})
2323

24-
M.move_cursor_previous_win = lazy.require_on_exported_call('smart-splits.api').move_cursor_previous_win
24+
M.move_cursor_previous = lazy.require_on_exported_call('smart-splits.api').move_cursor_previous
2525

2626
M.start_resize_mode = function()
2727
require('smart-splits.resize-mode').start_resize_mode()

0 commit comments

Comments
 (0)