diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-02-28 02:15:24 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-02-28 02:16:48 -0800 |
commit | be33d3f2a44ad16358b614c9f47fdb8094b4e127 (patch) | |
tree | 6f71351479ec06b1519e2ec5c26e220c1fdd0464 /pager.cpp | |
parent | 858b6aa257c13451d0537b19c6f035fdb5114ee6 (diff) |
Revert "Merge pull request #1317 from pullreq/cpp"
This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing
changes made to 6d749789ce240a3e6f1447777db63fd8e7525560.
See discussion in #1317
Diffstat (limited to 'pager.cpp')
-rw-r--r-- | pager.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1,7 +1,3 @@ -/** \file pager.cpp -*/ - - #include "config.h" #include "pager.h" @@ -149,6 +145,9 @@ line_t pager_t::completion_print_item(const wcstring &prefix, const comp_t *c, s { written += print_max(L" ", packed_color, 1, false, &line_data); } + written += print_max(L"(", packed_color, 1, false, &line_data); + written += print_max(c->desc, packed_color, desc_width, false, &line_data); + written += print_max(L")", packed_color, 1, false, &line_data); } else { @@ -632,6 +631,11 @@ bool pager_t::completion_try_print(size_t cols, const wcstring &prefix, const co { search_field_text.append(PAGER_SEARCH_FIELD_WIDTH - search_field_text.size(), L' '); } + line_t *search_field = &rendering->screen_data.insert_line_at_index(0); + + /* We limit the width to term_width - 1 */ + int search_field_written = print_max(SEARCH_FIELD_PROMPT, highlight_spec_normal, term_width - 1, false, search_field); + search_field_written += print_max(search_field_text, highlight_modifier_force_underline, term_width - search_field_written - 1, false, search_field); } } @@ -743,7 +747,7 @@ bool pager_t::select_next_completion_in_direction(selection_direction_t directio } /* Ok, we had something selected already. Select something different. */ - size_t new_selected_completion_idx; + size_t new_selected_completion_idx = selected_completion_idx; if (! selection_direction_is_cardinal(direction)) { /* Next, previous, or deselect, all easy */ |