mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
Renamed harpoon_wrap to ui_nav_wrap.
This commit is contained in:
parent
4bd2c4c792
commit
038bde660c
@ -74,7 +74,9 @@ function M.get_default_config()
|
|||||||
},
|
},
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
harpoon_wrap = true,
|
--- ui_nav_wrap allows the ability to enable(true) or disable(false) wrapping on prev and next list calls.
|
||||||
|
ui_nav_wrap = true,
|
||||||
|
|
||||||
--- select_with_nill allows for a list to call select even if the provided item is nil
|
--- select_with_nill allows for a list to call select even if the provided item is nil
|
||||||
select_with_nil = false,
|
select_with_nil = false,
|
||||||
|
|
||||||
|
@ -171,9 +171,9 @@ end
|
|||||||
|
|
||||||
function HarpoonList:next()
|
function HarpoonList:next()
|
||||||
self._index = self._index + 1
|
self._index = self._index + 1
|
||||||
if self._index > #self.items and self.config.harpoon_wrap then
|
if self._index > #self.items and self.config.ui_nav_wrap then
|
||||||
self._index = 1
|
self._index = 1
|
||||||
elseif self._index > #self.items and not self.config.harpoon_wrap then
|
elseif self._index > #self.items and not self.config.ui_nav_wrap then
|
||||||
self._index = #self.items
|
self._index = #self.items
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -182,9 +182,9 @@ end
|
|||||||
|
|
||||||
function HarpoonList:prev()
|
function HarpoonList:prev()
|
||||||
self._index = self._index - 1
|
self._index = self._index - 1
|
||||||
if self._index < 1 and self.config.harpoon_wrap then
|
if self._index < 1 and self.config.ui_nav_wrap then
|
||||||
self._index = #self.items
|
self._index = #self.items
|
||||||
elseif self._index < 1 and not self.config.harpoon_wrap then
|
elseif self._index < 1 and not self.config.ui_nav_wrap then
|
||||||
self._index = 1
|
self._index = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user