Strip preceeding and trailing newlines in TUI output (#2952)

#2767 adds a newline before the actual content of context sections. The layout leaves room for only one line for the legend section. The prepended newline caused the legend section to show up empty by default in TUI mode.
pull/2959/head
peace-maker 7 months ago committed by GitHub
parent 4f7acd53e5
commit 001926ebc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -133,7 +133,7 @@ class ContextTUIWindow:
def _receive_context_output(self, data: str):
if not self._verify_enabled_state():
return
self._lines = data.split("\n")
self._lines = data.strip("\n").split("\n")
self._blank_line_lengths = [
len(self._ansi_escape_regex.sub("", line)) for line in self._lines
]

Loading…
Cancel
Save