* Fix rafind2 build
* jk visual commands seeks an opcode size
This commit is contained in:
parent
3ab9e61c22
commit
2fd808e19b
|
@ -88,7 +88,7 @@ static int rafind_open(char *file) {
|
|||
}
|
||||
r_search_set_callback (rs, &hit, buffer);
|
||||
if (to == -1)
|
||||
to = r_io_size(io, fd);
|
||||
to = r_io_size(io);
|
||||
if (mode == R_SEARCH_KEYWORD) {
|
||||
list_for_each(pos, &(kws_head)) {
|
||||
BoxedString *kw = list_entry(pos, BoxedString, list);
|
||||
|
|
|
@ -704,6 +704,7 @@ R_API void r_core_visual_define (RCore *core) {
|
|||
|
||||
/* TODO: use r_cmd here in core->vcmd..optimize over 255 table */
|
||||
R_API int r_core_visual_cmd(RCore *core, int ch) {
|
||||
RAsmAop *aop;
|
||||
char buf[1024];
|
||||
int cols = core->print->cols;
|
||||
ch = r_cons_arrow_to_hjkl (ch);
|
||||
|
@ -831,12 +832,16 @@ R_API int r_core_visual_cmd(RCore *core, int ch) {
|
|||
r_core_seek (core, core->io->off, 1);
|
||||
break;
|
||||
case 'j':
|
||||
if (printidx == 1)
|
||||
cols = r_asm_disassemble (core->assembler, &aop, core->block, 32);
|
||||
if (curset) {
|
||||
cursor += cols;
|
||||
ocursor = -1;
|
||||
} else r_core_seek (core, core->offset+cols, 1);
|
||||
break;
|
||||
case 'k':
|
||||
if (printidx == 1)
|
||||
cols = r_asm_disassemble (core->assembler, &aop, core->block, 32);
|
||||
if (curset) {
|
||||
cursor -= cols;
|
||||
ocursor = -1;
|
||||
|
|
Loading…
Reference in New Issue