summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-11-18 21:47:16 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-11-18 21:47:16 +0000
commitf57f065d7618999bbdd9f92439550d90fd9b5adc (patch)
treefc5d128227f54e9c9f0802f75cd8d34b1af518b1 /src/input_handler.cc
parent56c0d2de95a7662820f07f6a55cd7e5283f9aabe (diff)
Fix prompt completion
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index ac0f188d..81de3d72 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -321,7 +321,7 @@ public:
{
m_history_it = ms_history[m_prompt].end();
if (context().options()["autoshowcompl"].get<bool>())
- refresh_completions();
+ refresh_completions(CompletionFlags::Fast);
display();
}
@@ -411,7 +411,7 @@ public:
// first try, we need to ask our completer for completions
if (candidates.empty())
{
- refresh_completions();
+ refresh_completions(CompletionFlags::None);
if (candidates.empty())
return;
@@ -462,7 +462,7 @@ public:
}
if (showcompl and context().options()["autoshowcompl"].get<bool>())
- refresh_completions();
+ refresh_completions(CompletionFlags::Fast);
display();
m_callback(line, PromptEvent::Change, context());
@@ -485,12 +485,12 @@ public:
KeymapMode keymap_mode() const override { return KeymapMode::Prompt; }
private:
- void refresh_completions()
+ void refresh_completions(CompletionFlags flags)
{
try
{
const String& line = m_line_editor.line();
- m_completions = m_completer(context(), CompletionFlags::Fast, line,
+ m_completions = m_completer(context(), flags, line,
line.byte_count_to(m_line_editor.cursor_pos()));
CandidateList& candidates = m_completions.candidates;
if (context().has_ui() and not candidates.empty())