mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 05:40:10 +00:00
Wheel is supported ##panels (#14581)
This commit is contained in:
parent
6d4ff48b4b
commit
f510e8f35a
@ -143,14 +143,20 @@ R_API int r_cons_arrow_to_hjkl(int ch) {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int sc = 0;
|
||||
|
||||
char vel[8] = {0};
|
||||
int vn = 0;
|
||||
do {
|
||||
ch = r_cons_readchar ();
|
||||
eprintf ( "%c", ch);
|
||||
//eprintf ( "%c", ch);
|
||||
if (sc > 0) {
|
||||
if (ch >= '0'&& ch <= '9') {
|
||||
pos[p++] = ch;
|
||||
}
|
||||
}
|
||||
if (sc < 1) {
|
||||
vel[vn++] = ch;
|
||||
}
|
||||
if (ch == ';') {
|
||||
if (sc == 1) {
|
||||
pos[p++] = 0;
|
||||
@ -160,6 +166,12 @@ R_API int r_cons_arrow_to_hjkl(int ch) {
|
||||
p = 0;
|
||||
}
|
||||
} while (ch != 'M' && ch != 'm');
|
||||
if (atoi (vel) == 64) {
|
||||
return 'k';
|
||||
}
|
||||
if (atoi (vel) == 65) {
|
||||
return 'j';
|
||||
}
|
||||
pos[p++] = 0;
|
||||
y = atoi (pos);
|
||||
// M is mouse down , m is mouse up
|
||||
|
@ -3378,7 +3378,8 @@ char *__print_decompiler_cb(void *user, void *p) {
|
||||
RAnalFunction *func = r_anal_get_fcn_in (core->anal, core->offset, R_ANAL_FCN_TYPE_NULL);
|
||||
char *cmdstr = NULL;
|
||||
if (func && core->panels_root->cur_pdc_cache) {
|
||||
cmdstr = (char *)sdb_ptr_get (core->panels_root->cur_pdc_cache, r_num_as_string (NULL, func->addr, false), 0);
|
||||
cmdstr = r_str_new ((char *)sdb_ptr_get (core->panels_root->cur_pdc_cache,
|
||||
r_num_as_string (NULL, func->addr, false), 0));
|
||||
}
|
||||
if (cmdstr) {
|
||||
return cmdstr;
|
||||
@ -3396,7 +3397,7 @@ char *__print_decompiler_cb(void *user, void *p) {
|
||||
sdb_ptr_set (sdb, r_num_as_string (NULL, func->addr, false), r_str_new (cmdstr), 0);
|
||||
core->panels_root->cur_pdc_cache = sdb;
|
||||
if (!sdb_exists (core->panels_root->pdc_caches, pdc_now)) {
|
||||
sdb_ptr_set (core->panels_root->pdc_caches, pdc_now, sdb, 0);
|
||||
sdb_ptr_set (core->panels_root->pdc_caches, r_str_new (pdc_now), sdb, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5511,10 +5512,10 @@ R_API int r_core_visual_panels_root(RCore *core, RPanelsRoot *panels_root) {
|
||||
}
|
||||
const char *pdc_now = r_config_get (core->config, "cmd.pdc");
|
||||
if (sdb_exists (panels_root->pdc_caches, pdc_now)) {
|
||||
panels_root->cur_pdc_cache = sdb_ptr_get (panels_root->pdc_caches, pdc_now, 0);
|
||||
panels_root->cur_pdc_cache = sdb_ptr_get (panels_root->pdc_caches, r_str_new (pdc_now), 0);
|
||||
} else {
|
||||
Sdb *sdb = sdb_new0();
|
||||
sdb_ptr_set (panels_root->pdc_caches, pdc_now, sdb, 0);
|
||||
sdb_ptr_set (panels_root->pdc_caches, r_str_new (pdc_now), sdb, 0);
|
||||
panels_root->cur_pdc_cache = sdb;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user