mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-09 23:11:41 +00:00
Do not output highlighted text when saving projects (#5004)
This commit is contained in:
parent
4b8af71ef4
commit
45efee7855
@ -274,6 +274,7 @@ R_API char *r_core_project_info(RCore *core, const char *prjfile) {
|
||||
|
||||
R_API bool r_core_project_save_rdb(RCore *core, const char *file, int opts) {
|
||||
char *filename;
|
||||
const char *ohl;
|
||||
int fd, fdold, tmp;
|
||||
|
||||
if (file == NULL || *file == '\0')
|
||||
@ -286,6 +287,8 @@ R_API bool r_core_project_save_rdb(RCore *core, const char *file, int opts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ohl = strdup (r_config_get (core->config, "scr.highlight"));
|
||||
r_config_set (core->config, "scr.highlight", "");
|
||||
fdold = r_cons_singleton ()->fdout;
|
||||
r_cons_singleton ()->fdout = fd;
|
||||
r_cons_singleton ()->is_interactive = false;
|
||||
@ -349,9 +352,11 @@ R_API bool r_core_project_save_rdb(RCore *core, const char *file, int opts) {
|
||||
|
||||
r_cons_singleton ()->fdout = fdold;
|
||||
r_cons_singleton ()->is_interactive = true;
|
||||
r_config_set (core->config, "scr.highlight", ohl);
|
||||
|
||||
close (fd);
|
||||
free (filename);
|
||||
free (ohl);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user