Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arrow keys not working in visual refs mode #10887

Merged
merged 2 commits into from Aug 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions libr/core/visual.c
Expand Up @@ -1136,6 +1136,7 @@ R_API int r_core_visual_refs(RCore *core, bool xref) {
}
r_cons_flush ();
ch = r_cons_readchar ();
ch = r_cons_arrow_to_hjkl (ch);
if (ch == ':') {
r_core_visual_prompt_input (core);
} else if (ch == '?') {
Expand All @@ -1161,10 +1162,10 @@ R_API int r_core_visual_refs(RCore *core, bool xref) {
printMode = lastPrintMode;
}
goto repeat;
} else if (r_cons_arrow_to_hjkl (ch) == 'j') {
} else if (ch == 'j') {
skip++;
goto repeat;
} else if (r_cons_arrow_to_hjkl (ch) == 'k') {
} else if (ch == 'k') {
skip--;
if (skip < 0) {
skip = 0;
Expand All @@ -1182,6 +1183,8 @@ R_API int r_core_visual_refs(RCore *core, bool xref) {
r_core_cmdf (core, "s 0x%"PFMT64x, refi->addr);
ret = 1;
}
} else if (ch != 'q' && ch != 'Q') {
goto repeat;
}
r_list_free (xrefs);
#else
Expand Down