* Do not show cursor in visual mode when cursor is disabled

This commit is contained in:
pancake 2010-10-08 00:48:07 +02:00
parent daa5d0fd38
commit cc4e664533
2 changed files with 5 additions and 2 deletions

View File

@ -272,7 +272,10 @@ static void r_print_disasm(RPrint *p, RCore *core, ut64 addr, ut8 *buf, int len,
pad[j] = ' ';
pad[j] = '\0';
if (show_color) {
char *nstr = r_print_hexpair (p, str, idx);
char *nstr;
p->cur_enabled = cursor!=-1;
p->cur = cursor;
nstr = r_print_hexpair (p, str, idx);
free (str);
str = nstr;
}

View File

@ -6,6 +6,7 @@
static int printidx = 0;
const char *printfmt[] = { "x", "pd", "f tmp&&sr sp&&x 64&&dr=&&s-&&s tmp&&f-tmp&&pd", "p8", "pc", "ps" };
// XXX: use core->print->cur_enabled instead of curset/cursor/ocursor
static int curset = 0, cursor = 0, ocursor=-1;
static int color = 1;
static int debug = 1;
@ -987,7 +988,6 @@ R_API int r_core_visual(RCore *core, const char *input) {
ut64 scrseek;
int ch;
core->print->cur_enabled = R_FALSE;
vi = r_config_get (core->config, "cmd.vprompt");
if (vi) r_core_cmd (core, vi, 0);