mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Fix ecn (and VR) when no custom theme was set in .rc ##cons
This commit is contained in:
parent
ef4c9b603d
commit
020c3056d0
@ -99,6 +99,10 @@ static bool nextpal_item(RCore *core, int mode, const char *file, int ctr) {
|
||||
// TODO: move logic here
|
||||
break;
|
||||
case 'n': // next
|
||||
if (curtheme && !strcmp (curtheme, "default")) {
|
||||
curtheme = r_str_dup (curtheme, fn);
|
||||
getNext = false;
|
||||
}
|
||||
if (getNext) {
|
||||
curtheme = r_str_dup (curtheme, fn);
|
||||
getNext = false;
|
||||
@ -209,6 +213,7 @@ static void nextpal(RCore *core, int mode) {
|
||||
// spaguetti!
|
||||
if (home) {
|
||||
files = r_sys_dir (home);
|
||||
r_list_sort (files, (RListComparator)strcmp);
|
||||
r_list_foreach (files, iter, fn) {
|
||||
if (*fn && *fn != '.') {
|
||||
if (mode == 'p') {
|
||||
@ -248,6 +253,7 @@ static void nextpal(RCore *core, int mode) {
|
||||
path = r_str_r2_prefix (R2_THEMES R_SYS_DIR);
|
||||
if (path) {
|
||||
files = r_sys_dir (path);
|
||||
r_list_sort (files, (RListComparator)strcmp);
|
||||
r_list_foreach (files, iter, fn) {
|
||||
if (*fn && *fn != '.') {
|
||||
if (mode == 'p') {
|
||||
@ -266,7 +272,7 @@ static void nextpal(RCore *core, int mode) {
|
||||
curtheme = strdup (fn);
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
} else { // next
|
||||
if (!nextpal_item (core, mode, fn, ctr++)) {
|
||||
goto done;
|
||||
}
|
||||
@ -415,7 +421,7 @@ static int cmd_eval(void *data, const char *input) {
|
||||
const char *th;
|
||||
r_list_foreach (themes_list, th_iter, th) {
|
||||
if (curtheme && !strcmp (curtheme, th)) {
|
||||
r_cons_printf ("> %s\n", th);
|
||||
r_cons_printf ("- %s\n", th);
|
||||
} else {
|
||||
r_cons_printf (" %s\n", th);
|
||||
}
|
||||
|
@ -1,3 +1,28 @@
|
||||
NAME=eco-ecn
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
eco~^-
|
||||
ecn
|
||||
eco~^-
|
||||
ecn
|
||||
eco~^-
|
||||
ecp
|
||||
eco~^-
|
||||
ecp
|
||||
eco~^-
|
||||
ecp
|
||||
eco~^-
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
- default
|
||||
- basic
|
||||
- behelit
|
||||
- basic
|
||||
- ayu
|
||||
- ayu
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=ec* fgbg
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user