*ctx*: Reset index when moving previous/next

This commit is contained in:
Sebastian Gniazdowski 2016-11-13 13:47:24 +01:00
parent 6a0bc43f7f
commit a215847fae

View file

@ -6,12 +6,14 @@
_hsmw_ctx_up() {
(( __hsmw_ctx_which -- ))
(( __hsmw_ctx_which < 0 )) && __hsmw_ctx_which=${#__hsmw_ctx_found}-1
__hsmw_ctx_idx=0
_hsmw_ctx_main
}
_hsmw_ctx_down() {
(( __hsmw_ctx_which ++ ))
(( __hsmw_ctx_which >= ${#__hsmw_ctx_found} )) && __hsmw_ctx_which=0
__hsmw_ctx_idx=0
_hsmw_ctx_main
}