mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-31 23:28:45 +00:00
Use in-line initialization for page_renderint_t's constructor
This commit is contained in:
parent
c9d2c99a98
commit
f24f952991
2 changed files with 12 additions and 21 deletions
|
@ -856,13 +856,4 @@ size_t pager_t::cursor_position() const {
|
|||
}
|
||||
|
||||
// Constructor
|
||||
page_rendering_t::page_rendering_t()
|
||||
: term_width(-1),
|
||||
term_height(-1),
|
||||
rows(0),
|
||||
cols(0),
|
||||
row_start(0),
|
||||
row_end(0),
|
||||
selected_completion_idx(-1),
|
||||
remaining_to_disclose(0),
|
||||
search_field_shown(false) {}
|
||||
page_rendering_t::page_rendering_t() = default;
|
||||
|
|
22
src/pager.h
22
src/pager.h
|
@ -19,19 +19,19 @@
|
|||
/// Represents rendering from the pager.
|
||||
class page_rendering_t {
|
||||
public:
|
||||
size_t term_width;
|
||||
size_t term_height;
|
||||
size_t rows;
|
||||
size_t cols;
|
||||
size_t row_start;
|
||||
size_t row_end;
|
||||
size_t selected_completion_idx;
|
||||
screen_data_t screen_data;
|
||||
size_t term_width{size_t(-1)};
|
||||
size_t term_height{size_t(-1)};
|
||||
size_t rows{0};
|
||||
size_t cols{0};
|
||||
size_t row_start{0};
|
||||
size_t row_end{0};
|
||||
size_t selected_completion_idx{size_t(-1)};
|
||||
screen_data_t screen_data{};
|
||||
|
||||
size_t remaining_to_disclose;
|
||||
size_t remaining_to_disclose{0};
|
||||
|
||||
bool search_field_shown;
|
||||
editable_line_t search_field_line;
|
||||
bool search_field_shown{false};
|
||||
editable_line_t search_field_line{};
|
||||
|
||||
// Returns a rendering with invalid data, useful to indicate "no rendering".
|
||||
page_rendering_t();
|
||||
|
|
Loading…
Reference in a new issue