Fix BOL detection for internal logging

Internal log messages are generated without setting "no_nl",
so the log is always at BOL next time.
This commit is contained in:
Joerg Wunsch
2024-03-28 09:53:42 +01:00
parent dff00a39ba
commit 471ce04604

View File

@@ -257,7 +257,7 @@ class adgui(QObject):
elif level < ad.MSG_TRACE:
html = f"<font color={color}>{s}</font><br>\n"
if s != "" and s != "\n":
new_bol = s[-1] == '\n'
new_bol = not no_nl or (s[-1] == '\n')
if not no_nl:
s += '\n'
# always save non-empty messages to debug log