Skip to content

Commit

Permalink
Fix handling of fragmented lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimbali committed Jul 12, 2024
1 parent 58c8acf commit 8d907f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prompt_toolkit/layout/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,8 +2040,8 @@ def find_next_wrap(
except IndexError:
return sys.maxsize, 0, []

char_pos -= fragment_list_len(line[:fragment])
line_part = [(style0, text0[char_pos:]), *line[fragment + 1 :]]
frag_char_pos = char_pos - fragment_list_len(line[:fragment])
line_part = [(style0, text0[frag_char_pos:]), *line[fragment + 1 :]]
line_width = [fragment_list_width([frag]) for frag in line_part]
line_width = [fragment_list_width([frag]) for frag in line_part]

Expand Down

0 comments on commit 8d907f9

Please sign in to comment.