Skip to content

Commit

Permalink
Merge pull request #80 from yetist/cjk-preview-title
Browse files Browse the repository at this point in the history
Support wide characters as preview title
  • Loading branch information
IngoMeyer441 authored Sep 19, 2023
2 parents b042d68 + d3862d7 commit 8899b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple_term_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ def limit_string_with_escape_codes(string: str, max_len: int) -> Tuple[str, int]
BoxDrawingCharacters.upper_left
+ (2 * BoxDrawingCharacters.horizontal + " " + self._preview_title)[: num_cols - 3]
+ " "
+ (num_cols - len(self._preview_title) - 6) * BoxDrawingCharacters.horizontal
+ (num_cols - wcswidth(self._preview_title) - 6) * BoxDrawingCharacters.horizontal
+ BoxDrawingCharacters.upper_right
)[:num_cols]
+ "\n"
Expand Down

0 comments on commit 8899b96

Please sign in to comment.