fix from vadim for fbrun-tabcompletion
mathias mathias
3 files changed,
5 insertions(+),
2 deletions(-)
M
src/FbTk/TextBox.hh
→
src/FbTk/TextBox.hh
@@ -68,6 +68,7 @@ const std::string &text() const { return m_text; }
const Font &font() const { return *m_font; } GC gc() const { return m_gc; } int cursorPosition() const { return m_cursor_pos; } + inline int textStartPos(){ return m_start_pos; } int findEmptySpaceLeft(); int findEmptySpaceRight();
M
util/fbrun/FbRun.cc
→
util/fbrun/FbRun.cc
@@ -343,7 +343,7 @@ XBell(m_display, 0);
} else { unsigned int nr= 0; int history_item = m_current_history_item - 1; - string prefix = text().substr(0, cursorPosition()); + string prefix = text().substr(0, textStartPos() + cursorPosition()); while (history_item != m_current_history_item && nr++ < m_history.size()) { if (history_item <= -1 ) history_item= m_history.size() - 1;@@ -362,7 +362,7 @@ void FbRun::tabCompleteApps() {
static bool first_run= true; static string saved_prefix= ""; - string prefix= text().substr(0, cursorPosition()); + string prefix= text().substr(0, textStartPos() + cursorPosition()); FbTk::Directory dir; bool add_dirs= false;