diff options
author | Hannes Koerber <hannes.koerber@gmail.com> | 2016-04-01 17:02:03 +0200 |
---|---|---|
committer | Hannes Koerber <hannes.koerber@gmail.com> | 2016-04-02 12:12:12 +0200 |
commit | f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a (patch) | |
tree | 5e8eb55b095af7afc1439792210b0fdf948dce19 /src/navigator.h | |
parent | 75dbf29e3fe413014c2aaaa4a813da1a5515fddd (diff) | |
download | imv-f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a.tar.gz |
Add -x switch to exit imv when reaching end of file list.
Diffstat (limited to 'src/navigator.h')
-rw-r--r-- | src/navigator.h | 7 |
1 files changed, 5 insertions, 2 deletions
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. */ |