mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-03 16:48: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
|
// Constructor
|
||||||
page_rendering_t::page_rendering_t()
|
page_rendering_t::page_rendering_t() = default;
|
||||||
: 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) {}
|
|
||||||
|
|
22
src/pager.h
22
src/pager.h
|
@ -19,19 +19,19 @@
|
||||||
/// Represents rendering from the pager.
|
/// Represents rendering from the pager.
|
||||||
class page_rendering_t {
|
class page_rendering_t {
|
||||||
public:
|
public:
|
||||||
size_t term_width;
|
size_t term_width{size_t(-1)};
|
||||||
size_t term_height;
|
size_t term_height{size_t(-1)};
|
||||||
size_t rows;
|
size_t rows{0};
|
||||||
size_t cols;
|
size_t cols{0};
|
||||||
size_t row_start;
|
size_t row_start{0};
|
||||||
size_t row_end;
|
size_t row_end{0};
|
||||||
size_t selected_completion_idx;
|
size_t selected_completion_idx{size_t(-1)};
|
||||||
screen_data_t screen_data;
|
screen_data_t screen_data{};
|
||||||
|
|
||||||
size_t remaining_to_disclose;
|
size_t remaining_to_disclose{0};
|
||||||
|
|
||||||
bool search_field_shown;
|
bool search_field_shown{false};
|
||||||
editable_line_t search_field_line;
|
editable_line_t search_field_line{};
|
||||||
|
|
||||||
// Returns a rendering with invalid data, useful to indicate "no rendering".
|
// Returns a rendering with invalid data, useful to indicate "no rendering".
|
||||||
page_rendering_t();
|
page_rendering_t();
|
||||||
|
|
Loading…
Reference in a new issue