Update right click sel

This commit is contained in:
Arun Prakash Jana 2020-03-01 12:44:28 +05:30
parent b2f2b78990
commit ad9f834b64
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -144,6 +144,7 @@
#define RFILTER '\\' #define RFILTER '\\'
#define CASE ':' #define CASE ':'
#define MSGWAIT '$' #define MSGWAIT '$'
#define SELECT ' '
#define REGEX_MAX 48 #define REGEX_MAX 48
#define ENTRY_INCR 64 /* Number of dir 'entry' structures to allocate per shot */ #define ENTRY_INCR 64 /* Number of dir 'entry' structures to allocate per shot */
#define NAMEBUF_INCR 0x800 /* 64 dir entries at once, avg. 32 chars per filename = 64*32B = 2KB */ #define NAMEBUF_INCR 0x800 /* 64 dir entries at once, avg. 32 chars per filename = 64*32B = 2KB */
@ -5174,7 +5175,8 @@ nochange:
/* Handle right click selection */ /* Handle right click selection */
if (event.bstate == BUTTON3_PRESSED) { if (event.bstate == BUTTON3_PRESSED) {
rightclicksel = 1; rightclicksel = 1;
goto selection; presel = SELECT;
goto nochange;
} }
currentmouse ^= 1; currentmouse ^= 1;
@ -5612,7 +5614,6 @@ nochange:
/* Repopulate as directory content may have changed */ /* Repopulate as directory content may have changed */
goto begin; goto begin;
} }
selection:
case SEL_SEL: case SEL_SEL:
if (!ndents) if (!ndents)
goto nochange; goto nochange;
@ -5643,14 +5644,13 @@ selection:
if (!nselected) if (!nselected)
unlink(g_selpath); unlink(g_selpath);
#ifndef NOMOUSE #ifndef NOMOUSE
if (rightclicksel) { if (rightclicksel)
rightclicksel = 0; rightclicksel = 0;
break; else
}
#endif #endif
/* move cursor to the next entry if this is not the last entry */ /* move cursor to the next entry if this is not the last entry */
if (!cfg.picker && cur != ndents - 1) if (!cfg.picker && cur != ndents - 1)
move_cursor((cur + 1) % ndents, 0); move_cursor((cur + 1) % ndents, 0);
break; break;
case SEL_SELMUL: case SEL_SELMUL:
if (!ndents) if (!ndents)