diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-03-03 17:25:40 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-03-05 18:49:26 +0100 |
| commit | fac222a4274da423acadb98173dc2023050b648f (patch) | |
| tree | 24aa27455d23915821b8de9b41005a1a5ffdb9ab /src/input_handler.cc | |
| parent | a36befd6535d0334f91606f157afb3c1cbf80c3c (diff) | |
Strongly typed options support
* non builtins options require declaration using the decl command
* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 663a924d..16454499 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -377,7 +377,7 @@ public: DisplayCoord menu_pos{ context().ui().dimensions().line, 0_char }; context().ui().menu_show(candidates, menu_pos, MenuStyle::Prompt); - bool use_common_prefix = context().options()["complete_prefix"].as_int(); + bool use_common_prefix = context().options()["complete_prefix"].get<int>(); String prefix = use_common_prefix ? common_prefix(candidates) : String(); if (m_completions.end - m_completions.start > prefix.length()) prefix = line.substr(m_completions.start, |
