summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-12-11 13:44:14 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-12-13 18:49:29 +0100
commit92c4a9abcea350431678429df5288a82ddfb36ce (patch)
treef28dc4616cd6830d02f42303249f44478139ec6c /src/input_handler.cc
parentbc1a90d4f504077c413a0b99bfd0ae589fad6817 (diff)
Prompt: when completion has only one candidate, next tab starts a new completion
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 9f8667f7..ec461845 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -377,6 +377,11 @@ public:
m_line_editor.insert_from(line.char_count_to(m_completions.start),
completion);
+
+ // when we have only one completion candidate, make next tab complete
+ // from the new content.
+ if (candidates.size() == 1)
+ m_current_completion = -1;
}
else
{