Skip to content

Commit 0746e55

Browse files
remove optional arg of cwcswidth
1 parent 262f65c commit 0746e55

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from typing import Dict, Any, List, Optional, Tuple, Union, cast
1717

1818
import blessings
19-
import cwcwidth
2019
import greenlet
2120
from curtsies import (
2221
FSArray,
@@ -283,7 +282,7 @@ def _process_ps(ps, default_ps: str):
283282
if not isinstance(ps, str):
284283
return ps
285284

286-
return ps if cwcwidth.wcswidth(ps, None) >= 0 else default_ps
285+
return ps if wcswidth(ps) >= 0 else default_ps
287286

288287

289288
class BaseRepl(Repl):
@@ -1626,8 +1625,8 @@ def move_screen_up(current_line_start_row):
16261625
)
16271626
else: # Common case for determining cursor position
16281627
cursor_row, cursor_column = divmod(
1629-
wcswidth(self.current_cursor_line_without_suggestion.s, None)
1630-
- wcswidth(self.current_line, None)
1628+
wcswidth(self.current_cursor_line_without_suggestion.s)
1629+
- wcswidth(self.current_line)
16311630
+ wcswidth(self.current_line, max(0, self.cursor_offset))
16321631
+ self.number_of_padding_chars_on_current_cursor_line(),
16331632
width,

0 commit comments

Comments
 (0)