File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 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]:
307307 screen .append (prompt + l )
308308 screeninfo .append ((lp , l2 ))
309309 else :
310- for i in range (wrapcount + 1 ):
310+ i = 0
311+ while l :
311312 prelen = lp if i == 0 else 0
312313 index_to_wrap_before = 0
313314 column = 0
@@ -317,12 +318,17 @@ def calc_complete_screen(self) -> list[str]:
317318 index_to_wrap_before += 1
318319 column += character_width
319320 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 = []
322327 screen .append (pre + l [:index_to_wrap_before ] + post )
323328 screeninfo .append ((prelen , l2 [:index_to_wrap_before ] + after ))
324329 l = l [index_to_wrap_before :]
325330 l2 = l2 [index_to_wrap_before :]
331+ i += 1
326332 self .screeninfo = screeninfo
327333 self .cxy = self .pos2xy ()
328334 if self .msg and self .msg_at_bottom :
You can’t perform that action at this time.
0 commit comments