aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-02 15:45:39 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-02 15:45:39 (GMT)
commit0e8a27e931e66a4823b761983dca38a59fa6f37f (patch)
tree5fe5ec110b1982e9781e41b9c5f6dd377d415f02 /util/fbrun
parent23097511432d6568e11d04c276310617585b766f (diff)
downloadfluxbox-0e8a27e931e66a4823b761983dca38a59fa6f37f.zip
fluxbox-0e8a27e931e66a4823b761983dca38a59fa6f37f.tar.bz2
Fix loading fbrun-history
Previous code add one additional entry on loading the history. This commit is one part of the patch #162 (see [1] and [2]), written by Ulrich Eckhardt <doomster@knuut.de>. [1]: https://sourceforge.net/p/fluxbox/patches/162/ [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fbrun-bug636632.patch;att=1;bug=636632
Diffstat (limited to 'util/fbrun')
-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