Fix terminfo in portable-lldb and fix terminal size (#3050)

* fix terminal size

* fix terminfo on portable lldb
bump-version
patryk4815 6 months ago committed by GitHub
parent 4381f8b23d
commit 4474878ea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -187,6 +187,7 @@ let
chmod -R +w $out
# copy extra files
mkdir -p $out/pwndbg/share/
cp -rf ${lib.getLib pkgs.ncurses}/share/terminfo/ $out/pwndbg/share/
# fix ipython autocomplete

@ -57,7 +57,7 @@ def addrsz(address) -> str:
def get_window_size(target=sys.stdout):
fallback = (int(os.environ.get("LINES", 20)), int(os.environ.get("COLUMNS", 80)))
fallback = (int(os.environ.get("LINES", 24)), int(os.environ.get("COLUMNS", 80)))
if not target.isatty():
return fallback
if os.environ.get("PWNDBG_IN_TEST") is not None:
@ -71,7 +71,7 @@ def get_window_size(target=sys.stdout):
try:
term = os.get_terminal_size(target.fileno())
return term.lines, term.columns
return term.lines or fallback[0], term.columns or fallback[1]
except Exception:
pass

Loading…
Cancel
Save