From 82574e2e27b189ea122384d249d11f8a72185ff2 Mon Sep 17 00:00:00 2001 From: Timothy Stack Date: Thu, 23 Jul 2015 23:06:52 -0700 Subject: [PATCH] [line_buffer] missed invalidating a sb ref --- src/line_buffer.cc | 1 + src/log_data_helper.hh | 2 +- src/log_format.cc | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/line_buffer.cc b/src/line_buffer.cc index 6aad2640..3411ed6a 100644 --- a/src/line_buffer.cc +++ b/src/line_buffer.cc @@ -251,6 +251,7 @@ throw (error) * The request is outside the cached range, need to reload the * whole thing. */ + this->lb_share_manager.invalidate_refs(); prefill = 0; this->lb_buffer_size = 0; if ((this->lb_file_size != (ssize_t)-1) && diff --git a/src/log_data_helper.hh b/src/log_data_helper.hh index 075c6637..41cdb947 100644 --- a/src/log_data_helper.hh +++ b/src/log_data_helper.hh @@ -88,8 +88,8 @@ public: struct line_range body; string_attrs_t sa; - this->ldh_file->read_full_message(ll, this->ldh_msg); this->ldh_line_values.clear(); + this->ldh_file->read_full_message(ll, this->ldh_msg); format->annotate(this->ldh_msg, sa, this->ldh_line_values); body = find_string_attr_range(sa, &textview_curses::SA_BODY); diff --git a/src/log_format.cc b/src/log_format.cc index a6b8fefa..4c29ef45 100644 --- a/src/log_format.cc +++ b/src/log_format.cc @@ -1152,13 +1152,13 @@ void external_log_format::get_subline(const logline &ll, shared_buffer_ref &sbr, if (full_message) { sbr.share(this->jlf_share_manager, - &this->jlf_cached_line[0], - this->jlf_cached_line.size()); + &this->jlf_cached_line[0], + this->jlf_cached_line.size()); } else { sbr.share(this->jlf_share_manager, - &this->jlf_cached_line[0] + this_off, - next_off - this_off); + &this->jlf_cached_line[0] + this_off, + next_off - this_off); } }