diff options
author | Bastien Dejean <nihilhill@gmail.com> | 2013-11-14 14:45:27 +0100 |
---|---|---|
committer | Bastien Dejean <nihilhill@gmail.com> | 2013-11-14 14:45:27 +0100 |
commit | 562197577b01aed5c98979a4fc90bf22662172cf (patch) | |
tree | d66b12c2fcb084c364b5bff548c79522c363d9e0 /commands.c | |
parent | 450c1ed9b54de4d374bff80735c874bb6f7a4a0f (diff) | |
download | nsxiv-562197577b01aed5c98979a4fc90bf22662172cf.tar.zst |
Add command to reverse marked images
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -251,6 +251,18 @@ bool it_toggle_image_mark(arg_t a) return true; } +bool it_reverse_marks(arg_t a) +{ + int i, cnt = mode == MODE_IMAGE ? filecnt : tns.cnt; + + for (i = 0; i < cnt; i++) { + files[i].marked = !files[i].marked; + markcnt += files[i].marked ? 1 : -1; + } + + return true; +} + bool it_navigate_marked(arg_t a) { long n = (long) a; |