We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a26c6f5 commit 2834081Copy full SHA for 2834081
src/prompt_toolkit/layout/containers.py
@@ -2035,7 +2035,11 @@ def find_next_wrap(
2035
return sys.maxsize, 0, []
2036
2037
line = ui_content.get_line(lineno)
2038
- style0, text0, *more = line[fragment]
+ try:
2039
+ style0, text0, *more = line[fragment]
2040
+ except IndexError:
2041
+ return sys.maxsize, 0, []
2042
+
2043
char_pos -= fragment_list_len(line[:fragment])
2044
line_part = [(style0, text0[char_pos:]), *line[fragment + 1 :]]
2045
line_width = [fragment_list_width([frag]) for frag in line_part]
0 commit comments