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
This commit is contained in:
parent
2309751143
commit
0e8a27e931
1 changed files with 3 additions and 5 deletions
|
@ -211,13 +211,11 @@ bool FbRun::loadHistory(const char *filename) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// clear old history and load new one from file
|
|
||||||
m_history.clear();
|
m_history.clear();
|
||||||
// each line is a command
|
|
||||||
string line;
|
string line;
|
||||||
while (!infile.eof()) {
|
while (getline(infile, line)) {
|
||||||
getline(infile, line);
|
if (!line.empty()) // don't add empty lines
|
||||||
if (line.size()) // don't add empty lines
|
|
||||||
m_history.push_back(line);
|
m_history.push_back(line);
|
||||||
}
|
}
|
||||||
// set no current histor to display
|
// set no current histor to display
|
||||||
|
|
Loading…
Reference in a new issue