From 0127e8b3cd84e4bf01c1a54dd8f33521c750c168 Mon Sep 17 00:00:00 2001 From: Andrea Jemmett <1787979+acidghost@users.noreply.github.com> Date: Sun, 12 May 2024 16:09:09 +0200 Subject: Fix comments in theme files --- src/btop_theme.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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'); -- cgit v1.2.3