make it possible to disable highlighters

This commit is contained in:
2023-01-26 19:31:33 +01:00
parent 8eee09680e
commit 07a6ec69fa
4 changed files with 47 additions and 10 deletions

View File

@@ -26,7 +26,12 @@ class LogFileModel:
self._file = os.path.realpath(file)
def highlighters(self):
return Highlighting.read_config(self.settings)
all_highlighters = Highlighting.read_config(self.settings)
active_highlighters = []
for h in all_highlighters:
if h.is_active():
active_highlighters.append(h)
return active_highlighters
def get_file(self):
return self._file