aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun/FbRun.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbrun/FbRun.cc')
-rw-r--r--util/fbrun/FbRun.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index d72d1bf..fcdf682 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -343,7 +343,7 @@ void FbRun::tabCompleteHistory() {
343 } else { 343 } else {
344 unsigned int nr= 0; 344 unsigned int nr= 0;
345 int history_item = m_current_history_item - 1; 345 int history_item = m_current_history_item - 1;
346 string prefix = text().substr(0, cursorPosition()); 346 string prefix = text().substr(0, textStartPos() + cursorPosition());
347 while (history_item != m_current_history_item && nr++ < m_history.size()) { 347 while (history_item != m_current_history_item && nr++ < m_history.size()) {
348 if (history_item <= -1 ) 348 if (history_item <= -1 )
349 history_item= m_history.size() - 1; 349 history_item= m_history.size() - 1;
@@ -362,7 +362,7 @@ void FbRun::tabCompleteApps() {
362 362
363 static bool first_run= true; 363 static bool first_run= true;
364 static string saved_prefix= ""; 364 static string saved_prefix= "";
365 string prefix= text().substr(0, cursorPosition()); 365 string prefix= text().substr(0, textStartPos() + cursorPosition());
366 FbTk::Directory dir; 366 FbTk::Directory dir;
367 367
368 bool add_dirs= false; 368 bool add_dirs= false;