mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Ignore errors when getting screen size for zsh completion output serialization
This commit is contained in:
parent
cb09ae3e84
commit
0a5c73dee4
1 changed files with 6 additions and 2 deletions
|
|
@ -227,8 +227,12 @@ def fish2_input_parser(data: str) -> ParseResult:
|
|||
def zsh_output_serializer(ans: Completions) -> str:
|
||||
lines = []
|
||||
|
||||
screen = screen_size_function(sys.stderr.fileno())()
|
||||
width = screen.cols
|
||||
try:
|
||||
screen = screen_size_function(sys.stderr.fileno())()
|
||||
except OSError:
|
||||
width = 80
|
||||
else:
|
||||
width = screen.cols
|
||||
|
||||
def fmt_desc(word: str, desc: str, max_word_len: int) -> Iterator[str]:
|
||||
if not desc:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue