| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 262f65c commit 0746e55
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,6 @@ | |||
| 16 | 16 | from typing import Dict, Any, List, Optional, Tuple, Union, cast | |
| 17 | 17 | ||
| 18 | 18 | import blessings | |
| 19 | - import cwcwidth | ||
| 20 | 19 | import greenlet | |
| 21 | 20 | from curtsies import ( | |
| 22 | 21 | FSArray, | |
@@ -283,7 +282,7 @@ def _process_ps(ps, default_ps: str): | |||
| 283 | 282 | if not isinstance(ps, str): | |
| 284 | 283 | return ps | |
| 285 | 284 | ||
| 286 | - return ps if cwcwidth.wcswidth(ps, None) >= 0 else default_ps | ||
| 285 | + return ps if wcswidth(ps) >= 0 else default_ps | ||
| 287 | 286 | ||
| 288 | 287 | ||
| 289 | 288 | class BaseRepl(Repl): | |
@@ -1626,8 +1625,8 @@ def move_screen_up(current_line_start_row): | |||
| 1626 | 1625 | ) | |
| 1627 | 1626 | else: # Common case for determining cursor position | |
| 1628 | 1627 | 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) | ||
| 1631 | 1630 | + wcswidth(self.current_line, max(0, self.cursor_offset)) | |
| 1632 | 1631 | + self.number_of_padding_chars_on_current_cursor_line(), | |
| 1633 | 1632 | width, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments