summaryrefslogtreecommitdiff
path: root/src/ncurses.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-09-11 14:30:32 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-09-11 14:30:32 +0200
commiteac68f09a461fc39366ef9bc19df7952ded97787 (patch)
tree3538a4e6f78f874f11501ba93c718c7bbca94e31 /src/ncurses.cc
parent859e907396b6039b0899b3942acbbda505e0e98d (diff)
NCursesClient::show_menu: stop displaying counts in front of items
Diffstat (limited to 'src/ncurses.cc')
-rw-r--r--src/ncurses.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ncurses.cc b/src/ncurses.cc
index a6590431..cf2072db 100644
--- a/src/ncurses.cc
+++ b/src/ncurses.cc
@@ -224,16 +224,14 @@ void NCursesClient::menu_show(const memoryview<String>& choices)
{
assert(m_menu == nullptr);
m_choices = std::vector<String>(choices.begin(), choices.end());
- for (int i = 0; i < m_choices.size(); ++i)
- m_counts.push_back(int_to_str(i+1));
CharCount longest = 0;
for (int i = 0; i < m_choices.size(); ++i)
{
- m_items.push_back(new_item(m_counts[i].c_str(), m_choices[i].c_str()));
+ m_items.push_back(new_item(m_choices[i].c_str(), ""));
longest = std::max(longest, m_choices[i].length());
}
m_items.push_back(nullptr);
- longest += m_counts.back().length() + 2;
+ longest += 1;
int max_x,max_y;
getmaxyx(stdscr, max_y, max_x);
@@ -276,7 +274,6 @@ void NCursesClient::menu_hide()
free_item(item);
m_menu = nullptr;
m_items.clear();
- m_counts.clear();
refresh();
}