From fac222a4274da423acadb98173dc2023050b648f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 3 Mar 2013 17:25:40 +0100 Subject: 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 --- src/input_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input_handler.cc') 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(); String prefix = use_common_prefix ? common_prefix(candidates) : String(); if (m_completions.end - m_completions.start > prefix.length()) prefix = line.substr(m_completions.start, -- cgit v1.2.3