summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--util/fbrun/FbRun.cc8
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cca8d66..88b8a88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.16: 2Changes for 0.9.16:
3*06/04/17:
4 * patchset missed my fbrun -Wall fixes (Simon)
5 util/fbrun/FbRun.cc
3*06/04/16: 6*06/04/16:
4 * Add option to reverse desktop wheeling, patch #1034287 7 * Add option to reverse desktop wheeling, patch #1034287
5 session.screen0.reversewheeling: true|false 8 session.screen0.reversewheeling: true|false
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 385f2b1..281b35f 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -145,7 +145,7 @@ void FbRun::run(const std::string &command) {
145 // now m_current_history_item points at the duplicate, or 145 // now m_current_history_item points at the duplicate, or
146 // at m_history.size() if no duplicate 146 // at m_history.size() if no duplicate
147 if (m_current_history_item != m_history.size()) { 147 if (m_current_history_item != m_history.size()) {
148 int i = 0; 148 unsigned int i = 0;
149 // read past history items before current 149 // read past history items before current
150 for (; inoutfile.good() && i < m_current_history_item; i++) 150 for (; inoutfile.good() && i < m_current_history_item; i++)
151 inoutfile.ignore(1, '\n'); 151 inoutfile.ignore(1, '\n');
@@ -342,16 +342,16 @@ void FbRun::tabCompleteHistory() {
342 XBell(m_display, 0); 342 XBell(m_display, 0);
343 } else { 343 } else {
344 unsigned int nr= 0; 344 unsigned int nr= 0;
345 int history_item = m_current_history_item - 1; 345 unsigned int history_item = m_current_history_item - 1;
346 string prefix = text().substr(0, textStartPos() + 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 )
349 history_item= m_history.size() - 1;
350 if (m_history[history_item].find(prefix) == 0) { 348 if (m_history[history_item].find(prefix) == 0) {
351 m_current_history_item = history_item; 349 m_current_history_item = history_item;
352 setText(m_history[m_current_history_item]); 350 setText(m_history[m_current_history_item]);
353 break; 351 break;
354 } 352 }
353 if (history_item == 0) // loop
354 history_item = m_history.size();
355 history_item--; 355 history_item--;
356 } 356 }
357 if (history_item == m_current_history_item) XBell(m_display, 0); 357 if (history_item == m_current_history_item) XBell(m_display, 0);