summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Jemmett <1787979+acidghost@users.noreply.github.com>2024-05-12 16:09:09 +0200
committerAndrea Jemmett <1787979+acidghost@users.noreply.github.com>2024-05-12 16:09:09 +0200
commit0127e8b3cd84e4bf01c1a54dd8f33521c750c168 (patch)
tree493e956be3aaf23e6e8be90b341ce23a6fcee847
parentdd4ada7023223c610ccfad48ec3abe0500f91af5 (diff)
Fix comments in theme files
-rw-r--r--src/btop_theme.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/btop_theme.cpp b/src/btop_theme.cpp
index 136adbf..b820369 100644
--- a/src/btop_theme.cpp
+++ b/src/btop_theme.cpp
@@ -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, '=');
@@ -394,6 +399,7 @@ namespace Theme {
if (themefile.peek() == '"') {
themefile.ignore(1);
getline(themefile, value, '"');
+ themefile.ignore(SSmax, '\n');
}
else getline(themefile, value, '\n');