Skip to content

Commit

Permalink
Merge pull request #850 from acidghost/theme-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos committed May 13, 2024
2 parents dd4ada7 0127e8b commit 3f917c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/btop_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 381,16 @@ namespace Theme {
if (themefile.good()) {
Logger::debug("Loading theme file: " filename);
while (not themefile.bad()) {
if (themefile.peek() == '#') {
themefile.ignore(SSmax, '\n');
continue;
}
themefile.ignore(SSmax, '[');
if (themefile.eof()) break;
string name, value;
getline(themefile, name, ']');
if (not Default_theme.contains(name)) {
themefile.ignore(SSmax, '\n');
continue;
}
themefile.ignore(SSmax, '=');
Expand All @@ -394,6 399,7 @@ namespace Theme {
if (themefile.peek() == '"') {
themefile.ignore(1);
getline(themefile, value, '"');
themefile.ignore(SSmax, '\n');
}
else getline(themefile, value, '\n');

Expand Down

0 comments on commit 3f917c0

Please sign in to comment.