diff options
author | fluxgen <fluxgen> | 2004-04-18 18:57:24 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-04-18 18:57:24 (GMT) |
commit | 4e360624e639a77a37818fd9b696a6c58aff0b54 (patch) | |
tree | 18d7de9f33d8df946e90b5c01aa2727ab92b45a7 /util | |
parent | 5c047ad1c3983aee5fd2513016189bd9ab63c857 (diff) | |
download | fluxbox_lack-4e360624e639a77a37818fd9b696a6c58aff0b54.zip fluxbox_lack-4e360624e639a77a37818fd9b696a6c58aff0b54.tar.bz2 |
minor fix
Diffstat (limited to 'util')
-rw-r--r-- | util/fbrun/FbRun.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 360adf5..a409527 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbRun.cc,v 1.26 2004/04/18 14:16:09 fluxgen Exp $ | 22 | // $Id: FbRun.cc,v 1.27 2004/04/18 18:57:24 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbRun.hh" | 24 | #include "FbRun.hh" |
25 | 25 | ||
@@ -135,7 +135,6 @@ FbRun::FbRun(int x, int y, size_t width): | |||
135 | 135 | ||
136 | sort(m_apps.begin(), m_apps.end()); | 136 | sort(m_apps.begin(), m_apps.end()); |
137 | unique(m_apps.begin(), m_apps.end()); | 137 | unique(m_apps.begin(), m_apps.end()); |
138 | reverse(m_apps.begin(), m_apps.end()); | ||
139 | 138 | ||
140 | if (!m_apps.empty()) | 139 | if (!m_apps.empty()) |
141 | m_current_apps_item= 1; | 140 | m_current_apps_item= 1; |
@@ -385,20 +384,20 @@ void FbRun::tabCompleteApps() { | |||
385 | if ( m_current_apps_item == 0 || m_apps.empty() ) { | 384 | if ( m_current_apps_item == 0 || m_apps.empty() ) { |
386 | XBell(m_display, 0); | 385 | XBell(m_display, 0); |
387 | } else { | 386 | } else { |
388 | unsigned int nr= 0; | 387 | size_t apps_item = m_current_apps_item + 1; |
389 | int apps_item = m_current_apps_item - 1; | ||
390 | string prefix = text().substr(0, cursorPosition()); | 388 | string prefix = text().substr(0, cursorPosition()); |
391 | while (apps_item != m_current_apps_item && nr++ < m_apps.size()) { | 389 | while (apps_item != m_current_apps_item) { |
392 | if (apps_item <= -1 ) | 390 | if (apps_item > m_apps.size() ) |
393 | apps_item= m_apps.size() - 1; | 391 | apps_item = 1; |
394 | if (m_apps[apps_item].find(prefix) == 0) { | 392 | if (m_apps[apps_item - 1].find(prefix) == 0) { |
395 | m_current_apps_item = apps_item; | 393 | m_current_apps_item = apps_item; |
396 | setText(m_apps[m_current_apps_item]); | 394 | setText(m_apps[m_current_apps_item - 1]); |
397 | break; | 395 | break; |
398 | } | 396 | } |
399 | apps_item--; | 397 | apps_item++; |
400 | } | 398 | } |
401 | if (apps_item == m_current_apps_item) XBell(m_display, 0); | 399 | if (apps_item == m_current_apps_item) |
400 | XBell(m_display, 0); | ||
402 | } | 401 | } |
403 | } | 402 | } |
404 | 403 | ||