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
Mathias Gumz akira@fluxbox.org
1 files changed,
3 insertions(+),
5 deletions(-)
jump to
M
util/fbrun/FbRun.cc
→
util/fbrun/FbRun.cc
@@ -211,13 +211,11 @@ return true;
} return false; } - // clear old history and load new one from file + m_history.clear(); - // each line is a command string line; - while (!infile.eof()) { - getline(infile, line); - if (line.size()) // don't add empty lines + while (getline(infile, line)) { + if (!line.empty()) // don't add empty lines m_history.push_back(line); } // set no current histor to display