From 8187035b3d3815c72fe08ced43fa8d0177c6c81a Mon Sep 17 00:00:00 2001 From: Tim Stack Date: Wed, 22 May 2024 06:14:14 -0700 Subject: [PATCH] [url] fix some url opening issues --- src/lnav_commands.cc | 1 + src/textfile_sub_source.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lnav_commands.cc b/src/lnav_commands.cc index 0609b1d0..8d45ea11 100644 --- a/src/lnav_commands.cc +++ b/src/lnav_commands.cc @@ -3118,6 +3118,7 @@ com_open(exec_context& ec, std::string cmdline, std::vector& args) lnav_data.ld_active_files.fc_file_names[ul->get_path()] .with_filename(fn) .with_init_location(file_loc); + lnav_data.ld_active_files.fc_files_generation += 1; isc::to().send( [ul](auto& clooper) { clooper.add_request(ul); }); lnav_data.ld_files_to_front.emplace_back(fn, file_loc); diff --git a/src/textfile_sub_source.cc b/src/textfile_sub_source.cc index 8a5030e8..a4adcc53 100644 --- a/src/textfile_sub_source.cc +++ b/src/textfile_sub_source.cc @@ -882,6 +882,7 @@ textfile_sub_source::rescan_files(textfile_sub_source::scan_callback& callback, if ((st.st_mtime != ms_iter->second.ms_mtime || st.st_size != ms_iter->second.ms_file_size) && (st.st_size < 10 * 1024 + || ms_iter->second.ms_file_size == 0 || !ms_iter->second.ms_metadata.m_sections_tree .empty())) { @@ -921,7 +922,7 @@ textfile_sub_source::rescan_files(textfile_sub_source::scan_callback& callback, this->tss_doc_metadata[lf->get_filename()] = metadata_state{ st.st_mtime, - static_cast(lf->get_index_size()), + lf->get_index_size(), lnav::document::discover_structure( content, line_range{0, -1},