File tree Expand file tree Collapse file tree 4 files changed +5
-31
lines changed
Expand file tree Collapse file tree 4 files changed +5
-31
lines changed Original file line number Diff line number Diff line change 3232
3333#include < map>
3434#include < set>
35+ #include < optional>
3536#include < string>
37+ #include < memory>
3638#include < vector>
3739
3840#include " base/attr_line.hh"
Original file line number Diff line number Diff line change @@ -511,6 +511,8 @@ prompt::rl_history(textinput_curses& tc)
511511 case context_t ::search:
512512 readline_regex_highlighter (al, std::nullopt );
513513 break ;
514+ default :
515+ break ;
514516 }
515517 poss.emplace_back (al.move ());
516518 };
Original file line number Diff line number Diff line change 2929
3030#include " plain_text_source.hh"
3131
32+ #include " base/intern_string.hh"
3233#include " base/itertools.hh"
3334#include " config.h"
3435#include " document.sections.hh"
3536#include " scn/scan.h"
3637
37- static std::vector<plain_text_source::text_line>
38- to_text_line (const std::vector<attr_line_t >& lines)
39- {
40- file_off_t off = 0 ;
41-
42- return lines | lnav::itertools::map ([&off](const auto & elem) {
43- auto retval = plain_text_source::text_line{
44- off,
45- elem,
46- };
47-
48- off += elem.length () + 1 ;
49- return retval;
50- });
51- }
52-
5338plain_text_source::plain_text_source (const string_fragment& text)
5439{
5540 size_t start = 0 ;
@@ -61,17 +46,6 @@ plain_text_source::plain_text_source(const string_fragment& text)
6146 this ->tds_longest_line = this ->compute_longest_line ();
6247}
6348
64- plain_text_source::plain_text_source (const std::vector<std::string>& text_lines)
65- {
66- this ->replace_with (text_lines);
67- }
68-
69- plain_text_source::plain_text_source (const std::vector<attr_line_t >& text_lines)
70- : tds_lines(to_text_line(text_lines))
71- {
72- this ->tds_longest_line = this ->compute_longest_line ();
73- }
74-
7549plain_text_source&
7650plain_text_source::replace_with (const attr_line_t & text_lines)
7751{
Original file line number Diff line number Diff line change @@ -67,10 +67,6 @@ public:
6767
6868 plain_text_source (const string_fragment& text);
6969
70- plain_text_source (const std::vector<std::string>& text_lines);
71-
72- plain_text_source (const std::vector<attr_line_t >& text_lines);
73-
7470 plain_text_source& set_reverse_selection (bool val)
7571 {
7672 this ->tds_reverse_selection = val;
You can’t perform that action at this time.
0 commit comments