aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2018-06-09 11:57:42 +0200
committerBert Münnich <ber.t@posteo.de>2018-06-09 11:57:42 +0200
commita1165df878466c3e7bd297ab36e3afd1a5401819 (patch)
treeb7eb8b9999fff849095b19558602b2304624fdd6
parent1e5cc7e3826028f745ebd366a7b2538141ceea75 (diff)
Rename variable toggledidx to markidx
-rw-r--r--commands.c12
-rw-r--r--main.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/commands.c b/commands.c
index 4ba7d3d..b5497d2 100644
--- a/commands.c
+++ b/commands.c
@@ -46,7 +46,7 @@ extern fileinfo_t *files;
extern int filecnt, fileidx;
extern int alternate;
extern int markcnt;
-extern int toggledidx;
+extern int markidx;
extern int prefix;
extern bool extprefix;
@@ -197,7 +197,7 @@ bool cg_toggle_image_mark(arg_t _)
markcnt += files[fileidx].flags & FF_MARK ? 1 : -1;
if (mode == MODE_THUMB)
tns_mark(&tns, fileidx, !!(files[fileidx].flags & FF_MARK));
- toggledidx = fileidx;
+ markidx = fileidx;
return true;
}
@@ -218,14 +218,14 @@ bool cg_mark_range(arg_t _)
{
int i, from, to;
- from = toggledidx;
+ from = markidx;
to = fileidx;
- if (fileidx < toggledidx) {
+ if (fileidx < markidx) {
from = fileidx;
- to = toggledidx;
+ to = markidx;
}
for (i = from; i <= to; i++) {
- if (files[toggledidx].flags & FF_MARK) {
+ if (files[markidx].flags & FF_MARK) {
if (!(files[i].flags & FF_MARK)) {
files[i].flags |= FF_MARK;
markcnt += 1;
diff --git a/main.c b/main.c
index 81b52c4..aa9775d 100644
--- a/main.c
+++ b/main.c
@@ -57,7 +57,7 @@ fileinfo_t *files;
int filecnt, fileidx;
int alternate;
int markcnt;
-int toggledidx;
+int markidx;
int prefix;
bool extprefix;
@@ -159,8 +159,8 @@ void remove_file(int n, bool manual)
fileidx--;
if (n < alternate)
alternate--;
- if (n < toggledidx)
- toggledidx--;
+ if (n < markidx)
+ markidx--;
}
void set_timeout(timeout_f handler, int time, bool overwrite)