aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun/FbRun.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbrun/FbRun.cc')
-rw-r--r--util/fbrun/FbRun.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 66a5fec..a858487 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -211,13 +211,11 @@ bool FbRun::loadHistory(const char *filename) {
211 } 211 }
212 return false; 212 return false;
213 } 213 }
214 // clear old history and load new one from file 214
215 m_history.clear(); 215 m_history.clear();
216 // each line is a command
217 string line; 216 string line;
218 while (!infile.eof()) { 217 while (getline(infile, line)) {
219 getline(infile, line); 218 if (!line.empty()) // don't add empty lines
220 if (line.size()) // don't add empty lines
221 m_history.push_back(line); 219 m_history.push_back(line);
222 } 220 }
223 // set no current histor to display 221 // set no current histor to display