rizin
rizin copied to clipboard
Support mouse clicks in "cursor" mode of hex editor.
If we go in the cursor mode (press c key in the visual hexdump mode) it only allows to move it using keys. Would be great to also support direct move with a mouse click, modern terminals allow that.
I'd like to work on this issue
Hi @notxvilka Though I have added the support for mouse click (for px mode). Do we need to add support for other modes like - pxw, pxr, pxa, pxb, pxq, pxr, pxh, pxd ?
RZ_IPI void rz_core_visual_applyHexMode(RzCore *core, int hexMode) {
RzCoreVisual *visual = core->visual;
visual->currentFormat = RZ_ABS(hexMode) % PRINT_HEX_FORMATS;
switch (visual->currentFormat) {
case 0: /* px */
case 3: /* prx */
case 6: /* pxw */
case 9: /* pxr */
rz_config_set(core->config, "hex.compact", "false");
rz_config_set(core->config, "hex.comments", "true");
break;
case 1: /* pxa */
case 4: /* pxb */
case 7: /* pxq */
rz_config_set(core->config, "hex.compact", "true");
rz_config_set(core->config, "hex.comments", "true");
break;
case 2: /* pxr */
case 5: /* pxh */
case 8: /* pxd */
rz_config_set(core->config, "hex.compact", "false");
rz_config_set(core->config, "hex.comments", "false");
break;
}
}
@notxvilka Can you please tell me why two cases are there for pxr ? case 9 and case 2