From f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a Mon Sep 17 00:00:00 2001 From: Hannes Koerber Date: Fri, 1 Apr 2016 17:02:03 +0200 Subject: Add -x switch to exit imv when reaching end of file list. --- src/navigator.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/navigator.h') diff --git a/src/navigator.h b/src/navigator.h index 749f656..fc4d5f9 100644 --- a/src/navigator.h +++ b/src/navigator.h @@ -47,8 +47,11 @@ void imv_navigator_add(struct imv_navigator *nav, const char *path, * guaranteed to be valid until the next call to an imv_navigator method. */ const char *imv_navigator_selection(struct imv_navigator *nav); -/* Change the currently selected path. dir = -1 for previous, 1 for next */ -void imv_navigator_select_rel(struct imv_navigator *nav, int dir); +/* Change the currently selected path. dir = -1 for previous, 1 for next + * cycle = 1 to go to the beginning of the file list if end is reached + * cycle = 0 to return error instead + * Returns 1 on success, 0 otherwise */ +int imv_navigator_select_rel(struct imv_navigator *nav, int dir, int cycle); /* Removes the given path. The current selection is updated if necessary, * based on the last direction the selection moved. */ -- cgit v1.2.3