mirror of
https://codeberg.org/nsxiv/nsxiv
synced 2024-11-15 12:13:10 +00:00
Rename variable toggledidx to markidx
This commit is contained in:
parent
1e5cc7e382
commit
a1165df878
12
commands.c
12
commands.c
@ -46,7 +46,7 @@ extern fileinfo_t *files;
|
|||||||
extern int filecnt, fileidx;
|
extern int filecnt, fileidx;
|
||||||
extern int alternate;
|
extern int alternate;
|
||||||
extern int markcnt;
|
extern int markcnt;
|
||||||
extern int toggledidx;
|
extern int markidx;
|
||||||
|
|
||||||
extern int prefix;
|
extern int prefix;
|
||||||
extern bool extprefix;
|
extern bool extprefix;
|
||||||
@ -197,7 +197,7 @@ bool cg_toggle_image_mark(arg_t _)
|
|||||||
markcnt += files[fileidx].flags & FF_MARK ? 1 : -1;
|
markcnt += files[fileidx].flags & FF_MARK ? 1 : -1;
|
||||||
if (mode == MODE_THUMB)
|
if (mode == MODE_THUMB)
|
||||||
tns_mark(&tns, fileidx, !!(files[fileidx].flags & FF_MARK));
|
tns_mark(&tns, fileidx, !!(files[fileidx].flags & FF_MARK));
|
||||||
toggledidx = fileidx;
|
markidx = fileidx;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,14 +218,14 @@ bool cg_mark_range(arg_t _)
|
|||||||
{
|
{
|
||||||
int i, from, to;
|
int i, from, to;
|
||||||
|
|
||||||
from = toggledidx;
|
from = markidx;
|
||||||
to = fileidx;
|
to = fileidx;
|
||||||
if (fileidx < toggledidx) {
|
if (fileidx < markidx) {
|
||||||
from = fileidx;
|
from = fileidx;
|
||||||
to = toggledidx;
|
to = markidx;
|
||||||
}
|
}
|
||||||
for (i = from; i <= to; i++) {
|
for (i = from; i <= to; i++) {
|
||||||
if (files[toggledidx].flags & FF_MARK) {
|
if (files[markidx].flags & FF_MARK) {
|
||||||
if (!(files[i].flags & FF_MARK)) {
|
if (!(files[i].flags & FF_MARK)) {
|
||||||
files[i].flags |= FF_MARK;
|
files[i].flags |= FF_MARK;
|
||||||
markcnt += 1;
|
markcnt += 1;
|
||||||
|
6
main.c
6
main.c
@ -57,7 +57,7 @@ fileinfo_t *files;
|
|||||||
int filecnt, fileidx;
|
int filecnt, fileidx;
|
||||||
int alternate;
|
int alternate;
|
||||||
int markcnt;
|
int markcnt;
|
||||||
int toggledidx;
|
int markidx;
|
||||||
|
|
||||||
int prefix;
|
int prefix;
|
||||||
bool extprefix;
|
bool extprefix;
|
||||||
@ -159,8 +159,8 @@ void remove_file(int n, bool manual)
|
|||||||
fileidx--;
|
fileidx--;
|
||||||
if (n < alternate)
|
if (n < alternate)
|
||||||
alternate--;
|
alternate--;
|
||||||
if (n < toggledidx)
|
if (n < markidx)
|
||||||
toggledidx--;
|
markidx--;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_timeout(timeout_f handler, int time, bool overwrite)
|
void set_timeout(timeout_f handler, int time, bool overwrite)
|
||||||
|
Loading…
Reference in New Issue
Block a user