aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbrun')
-rw-r--r--util/fbrun/FbRun.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 3bf83aa..2843cff 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -334,11 +334,13 @@ void FbRun::nextHistoryItem() {
334 XBell(m_display, 0); 334 XBell(m_display, 0);
335 } else { 335 } else {
336 m_current_history_item++; 336 m_current_history_item++;
337 FbTk::BiDiString text("");
337 if (m_current_history_item == m_history.size()) { 338 if (m_current_history_item == m_history.size()) {
338 m_current_history_item = m_history.size(); 339 m_current_history_item = m_history.size();
339 setText(""); 340 } else
340 } else 341 text.setLogical((m_history[m_current_history_item]));
341 setText(m_history[m_current_history_item]); 342
343 setText(text);
342 } 344 }
343} 345}
344 346
@@ -347,7 +349,7 @@ void FbRun::firstHistoryItem() {
347 XBell(m_display, 0); 349 XBell(m_display, 0);
348 } else { 350 } else {
349 m_current_history_item = 0; 351 m_current_history_item = 0;
350 setText(m_history[m_current_history_item]); 352 setText(FbTk::BiDiString(m_history[m_current_history_item]));
351 } 353 }
352} 354}
353 355
@@ -357,7 +359,7 @@ void FbRun::lastHistoryItem() {
357 XBell(m_display, 0); 359 XBell(m_display, 0);
358 } else { 360 } else {
359 m_current_history_item = m_history.size(); 361 m_current_history_item = m_history.size();
360 setText(""); 362 setText(FbTk::BiDiString(""));
361 } 363 }
362} 364}
363 365
@@ -373,7 +375,7 @@ void FbRun::tabCompleteHistory() {
373 while (history_item != m_current_history_item && nr++ < m_history.size()) { 375 while (history_item != m_current_history_item && nr++ < m_history.size()) {
374 if (m_history[history_item].find(m_last_completion_prefix) == 0) { 376 if (m_history[history_item].find(m_last_completion_prefix) == 0) {
375 m_current_history_item = history_item; 377 m_current_history_item = history_item;
376 setText(m_history[m_current_history_item]); 378 setText(FbTk::BiDiString(m_history[m_current_history_item]));
377 cursorEnd(); 379 cursorEnd();
378 break; 380 break;
379 } 381 }