Skip to content

Commit 0c57f67

Browse files
authored
chore!: remove 0.6 support (#13)
1 parent 5222592 commit 0c57f67

2 files changed

Lines changed: 11 additions & 36 deletions

File tree

lua/Navigator/navigate.lua

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,12 @@ function N.setup(opts)
3131
N.config = vim.tbl_extend('keep', opts, N.config)
3232
end
3333

34-
-- NOTE: remove this after 0.7 release
35-
if not A.nvim_create_autocmd then
36-
function N.reset()
34+
A.nvim_create_autocmd('WinEnter', {
35+
group = A.nvim_create_augroup('NAVIGATOR', { clear = true }),
36+
callback = function()
3737
N.last_pane = false
38-
end
39-
40-
vim.cmd([[
41-
augroup NAVIGATOR
42-
au!
43-
autocmd WinEnter * lua require("Navigator.navigate").reset()
44-
augroup END
45-
]])
46-
else
47-
A.nvim_create_autocmd('WinEnter', {
48-
group = A.nvim_create_augroup('NAVIGATOR', { clear = true }),
49-
callback = function()
50-
N.last_pane = false
51-
end,
52-
})
53-
end
38+
end,
39+
})
5440
end
5541

5642
---Checks whether we need to move to the nearby tmux pane

plugin/Navigator.lua

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
local ucmd = vim.api.nvim_create_user_command
22

3-
-- NOTE: remove this after 0.7 release
4-
if not ucmd then
5-
vim.cmd([[
6-
command NavigatorLeft lua require'Navigator'.left()
7-
command NavigatorRight lua require'Navigator'.right()
8-
command NavigatorUp lua require'Navigator'.up()
9-
command NavigatorDown lua require'Navigator'.down()
10-
command NavigatorPrevious lua require'Navigator'.previous()
11-
]])
12-
else
13-
local N = require('Navigator')
3+
local N = require('Navigator')
144

15-
ucmd('NavigatorLeft', N.left, {})
16-
ucmd('NavigatorRight', N.right, {})
17-
ucmd('NavigatorUp', N.up, {})
18-
ucmd('NavigatorDown', N.down, {})
19-
ucmd('NavigatorPrevious', N.previous, {})
20-
end
5+
ucmd('NavigatorLeft', N.left, {})
6+
ucmd('NavigatorRight', N.right, {})
7+
ucmd('NavigatorUp', N.up, {})
8+
ucmd('NavigatorDown', N.down, {})
9+
ucmd('NavigatorPrevious', N.previous, {})

0 commit comments

Comments
 (0)