Fix scr.wheel glich

This commit is contained in:
pancake 2019-07-02 03:56:18 +02:00 committed by radare
parent 5122d2b9be
commit f2ba098deb
2 changed files with 2 additions and 12 deletions

View File

@ -1938,12 +1938,6 @@ static bool cb_fps(void *user, void *data) {
return true;
}
static bool cb_scrwheel(void* user, void* data) {
RConfigNode *node = (RConfigNode*) data;
r_cons_enable_mouse (node->i_value);
return true;
}
static bool cb_scrbreakword(void* user, void* data) {
RConfigNode *node = (RConfigNode*) data;
if (*node->value) {
@ -3417,7 +3411,7 @@ R_API int r_core_config_init(RCore *core) {
#endif
SETPREF ("scr.wheel.nkey", "false", "Use sn/sp and scr.nkey on wheel instead of scroll");
// RENAME TO scr.mouse
SETCB ("scr.wheel", "true", &cb_scrwheel, "Mouse wheel in Visual; temporaryly disable/reenable by right click/Enter)");
SETPREF ("scr.wheel", "true", "Mouse wheel in Visual; temporaryly disable/reenable by right click/Enter)");
// DEPRECATED: USES hex.cols now SETI ("scr.colpos", 80, "Column position of cmd.cprompt in visual");
SETCB ("scr.breakword", "", &cb_scrbreakword, "Emulate console break (^C) when a word is printed (useful for pD)");
SETCB ("scr.breaklines", "false", &cb_breaklines, "Break lines in Visual instead of truncating them");

View File

@ -390,11 +390,7 @@ static const char *rotateAsmemu(RCore *core) {
R_API void r_core_visual_showcursor(RCore *core, int x) {
if (core && core->vmode) {
r_cons_show_cursor (x);
if (!x) {
r_cons_enable_mouse (r_config_get_i (core->config, "scr.wheel"));
} else {
r_cons_enable_mouse (false);
}
r_cons_enable_mouse (r_config_get_i (core->config, "scr.wheel"));
} else {
r_cons_enable_mouse (false);
}