Skip to content

Commit 683bc06

Browse files
committed
Specify length instead of splicing
1 parent e1676d3 commit 683bc06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

curtsies/formatstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def width_at_offset(self, n):
557557
# type: (int) -> int
558558
"""Returns the horizontal position of character n of the string"""
559559
# TODO make more efficient?
560-
width = wcswidth(self.s[:n])
560+
width = wcswidth(self.s, n)
561561
assert width != -1
562562
return width
563563

0 commit comments

Comments
 (0)