summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/FbTk/TextBox.hh1
-rw-r--r--util/fbrun/FbRun.cc4
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a70c2f..b42ffbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.13 2Changes for 0.9.13
3*05/05/09: 3*05/05/09:
4 * Fix for fbrun and completion (thanx Vadim)
5 TextBox.hh fbrun.cc
4 * Fix for gentoo-bug #91955 (thanx Julien Trolet) 6 * Fix for gentoo-bug #91955 (thanx Julien Trolet)
5 Remembering the position of a window didnt store the reference 7 Remembering the position of a window didnt store the reference
6 corner 8 corner
diff --git a/src/FbTk/TextBox.hh b/src/FbTk/TextBox.hh
index 6b68f28..02b8f59 100644
--- a/src/FbTk/TextBox.hh
+++ b/src/FbTk/TextBox.hh
@@ -68,6 +68,7 @@ public:
68 const Font &font() const { return *m_font; } 68 const Font &font() const { return *m_font; }
69 GC gc() const { return m_gc; } 69 GC gc() const { return m_gc; }
70 int cursorPosition() const { return m_cursor_pos; } 70 int cursorPosition() const { return m_cursor_pos; }
71 inline int textStartPos(){ return m_start_pos; }
71 72
72 int findEmptySpaceLeft(); 73 int findEmptySpaceLeft();
73 int findEmptySpaceRight(); 74 int findEmptySpaceRight();
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;