[pretty] fix crash when rewriting lines

pull/672/head
Timothy Stack 5 years ago
parent 5e8a1cebe9
commit 6f451eec35

@ -1282,7 +1282,8 @@
"value" : {
"syscall" : {
"kind" : "string",
"identifier" : true
"identifier" : true,
"rewriter" : ":pipe-line-to explain-syscall.sh ${syscall}"
},
"args" : {
"kind" : "string"

@ -650,7 +650,9 @@ public:
textview_curses &set_sub_source(text_sub_source *src) {
this->tc_sub_source = src;
src->register_view(this);
if (src) {
src->register_view(this);
}
this->reload_data();
return *this;
};

@ -73,6 +73,7 @@ static void open_pretty_view(void)
attr_line_t full_text;
delete pretty_tc->get_sub_source();
pretty_tc->set_sub_source(nullptr);
if (top_tc->get_inner_height() == 0) {
pretty_tc->set_sub_source(new plain_text_source(NOTHING_MSG));
return;

@ -36,8 +36,10 @@ check_output "json log format is not working" <<EOF
EOF
run_test ${lnav_test} -n \
-I ${test_dir} -c ':switch-to-view pretty' \
run_test ${lnav_test} -n -I ${test_dir} \
-c ':switch-to-view pretty' \
-c ':switch-to-view log' \
-c ':switch-to-view pretty' \
${test_dir}/logfile_json.json
check_output "json log format is not working" <<EOF

Loading…
Cancel
Save