File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,8 @@ def calc_complete_screen(self) -> list[str]:
307
307
screen .append (prompt + l )
308
308
screeninfo .append ((lp , l2 ))
309
309
else :
310
- for i in range (wrapcount + 1 ):
310
+ i = 0
311
+ while l :
311
312
prelen = lp if i == 0 else 0
312
313
index_to_wrap_before = 0
313
314
column = 0
@@ -317,12 +318,17 @@ def calc_complete_screen(self) -> list[str]:
317
318
index_to_wrap_before += 1
318
319
column += character_width
319
320
pre = prompt if i == 0 else ""
320
- post = "\\ " if i != wrapcount else ""
321
- after = [1 ] if i != wrapcount else []
321
+ if len (l ) > index_to_wrap_before :
322
+ post = "\\ "
323
+ after = [1 ]
324
+ else :
325
+ post = ""
326
+ after = []
322
327
screen .append (pre + l [:index_to_wrap_before ] + post )
323
328
screeninfo .append ((prelen , l2 [:index_to_wrap_before ] + after ))
324
329
l = l [index_to_wrap_before :]
325
330
l2 = l2 [index_to_wrap_before :]
331
+ i += 1
326
332
self .screeninfo = screeninfo
327
333
self .cxy = self .pos2xy ()
328
334
if self .msg and self .msg_at_bottom :
You can’t perform that action at this time.
0 commit comments