diff options
author | 2014-01-19 23:52:35 -0800 | |
---|---|---|
committer | 2014-01-19 23:52:35 -0800 | |
commit | 998ce1fe89800994fb378e5f2c5554dcab6782fb (patch) | |
tree | 70a2498a5d2e0689bf7c63abf6932a29cf7876c3 /pager.cpp | |
parent | d9d65577f4f2f7ca7b3866c10c44136c75d6e6ef (diff) |
Support for correctly resizing pager contents.
Diffstat (limited to 'pager.cpp')
-rw-r--r-- | pager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -937,7 +937,7 @@ void pager_t::update_rendering(page_rendering_t *rendering) const } } -pager_t::pager_t() : term_width(0), term_height(0), selected_completion_idx(-1) +pager_t::pager_t() : term_width(0), term_height(0), selected_completion_idx(PAGER_SELECTION_NONE) { } @@ -978,7 +978,7 @@ const completion_t *pager_t::select_next_completion_in_direction(selection_direc if (direction == direction_next) { new_selected_completion_idx = selected_completion_idx + 1; - if (new_selected_completion_idx > completion_infos.size()) + if (new_selected_completion_idx >= completion_infos.size()) { new_selected_completion_idx = 0; } @@ -1128,6 +1128,7 @@ void pager_t::clear() completions.clear(); completion_infos.clear(); prefix.clear(); + selected_completion_idx = PAGER_SELECTION_NONE; } page_rendering_t::page_rendering_t() : term_width(-1), term_height(-1), rows(0), cols(0), selected_completion_idx(-1) |