listpick 0.1.13.45__py3-none-any.whl → 0.1.13.46__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
listpick/listpick_app.py CHANGED
@@ -1008,14 +1008,15 @@ class Picker:
1008
1008
  self.infobox_picker.stdscr.resize(infobox_height, infobox_width)
1009
1009
  self.infobox_picker.run()
1010
1010
  self.infobox_picker.stdscr.noutrefresh()
1011
+ curses.doupdate()
1011
1012
  else:
1012
1013
  # self.stdscr.noutrefresh()
1013
1014
  pass
1014
1015
 
1015
1016
 
1016
- if not self.display_only:
1017
- # curses.doupdate()
1018
- self.stdscr.refresh()
1017
+ # if not self.display_only:
1018
+ # self.stdscr.refresh()
1019
+ # pass
1019
1020
 
1020
1021
 
1021
1022
  def infobox(self, stdscr: curses.window, message: list =[], title: str ="Infobox", colours_end: int = 0, duration: int = 4):
listpick/utils/utils.py CHANGED
@@ -49,23 +49,28 @@ def truncate_to_display_width(text: str, max_column_width: int, centre=False, un
49
49
  if unicode_char_width:
50
50
  result = ''
51
51
  width = 0
52
- test_str = text[:max_column_width]
53
- while True:
54
- width = wcswidth(test_str)
55
- if width < max_column_width or width == 0:
52
+
53
+
54
+ for char in text:
55
+ w = wcwidth(char)
56
+ if w < 0:
57
+ continue
58
+ if width + w > max_column_width:
56
59
  break
57
- test_str = test_str[:-1]
58
- # for char in text:
59
- # w = wcwidth(char)
60
- # if w < 0:
61
- # continue
62
- # if width + w > max_column_width:
60
+ result += char
61
+ width += w
62
+
63
+ # test_str = text[:max_column_width]
64
+ # while True:
65
+ # width = wcswidth(test_str)
66
+ # if width < max_column_width or width == 0:
63
67
  # break
64
- # result += char
65
- # width += w
68
+ # test_str = test_str[:-1]
69
+ # result = test_str
70
+
71
+
66
72
  # Pad if it's shorter
67
73
  # padding = max_column_width - wcswidth(result)
68
- result = test_str
69
74
  # return result + ' ' * padding
70
75
  else:
71
76
  result = text[:max_column_width]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.13.45
3
+ Version: 0.1.13.46
4
4
  Summary: Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
5
5
  Home-page: https://github.com/grimandgreedy/listpick
6
6
  Author: Grim
@@ -1,6 +1,6 @@
1
1
  listpick/__init__.py,sha256=ExXc97-bibodH--wlwpQivl0zCNR5D1hvpvrf7OBofU,154
2
2
  listpick/__main__.py,sha256=wkCjDdqw093W27yWwnlC3nG_sMRKaIad7hHHWy0RBgY,193
3
- listpick/listpick_app.py,sha256=0XDTW2lJ6xGWfoLFGFyjBXAhZ26x1gJsjuGWFJ1HPmE,164025
3
+ listpick/listpick_app.py,sha256=tDrN1x1zVIIVnd264S2EyyHtojkr6RSHTN0WX3mxD5Q,164046
4
4
  listpick/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  listpick/ui/build_help.py,sha256=_rVKKrX3HfFJtw-pyeNb2lQWbml4-AAw8sZIUYGn97Y,8731
6
6
  listpick/ui/footer.py,sha256=4PO7gS-NSk6zfc2DAwSFPU6Ch_HYfu0L_57u93zfyjk,10711
@@ -22,10 +22,10 @@ listpick/utils/search_and_filter_utils.py,sha256=XxGfkyDVXO9OAKcftPat8IReMTFIuTH
22
22
  listpick/utils/searching.py,sha256=Xk5UIqamNHL2L90z3ACB_Giqdpi9iRKoAJ6pKaqaD7Q,3093
23
23
  listpick/utils/sorting.py,sha256=WZZiVlVA3Zkcpwji3U5SNFlQ14zVEk3cZJtQirBkecQ,5329
24
24
  listpick/utils/table_to_list_of_lists.py,sha256=T-i-nV1p6g8UagdgUPKrhIGpKY_YXZDxf4xZzcPepNA,7635
25
- listpick/utils/utils.py,sha256=eq4aOkYmBfEGk7mWDV-AI_osf_zowe8GiS5O0GhvSHo,13819
26
- listpick-0.1.13.45.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
27
- listpick-0.1.13.45.dist-info/METADATA,sha256=8tadX-m_1c0UV07qPydyVz26ElTGpvfMVeGrjAV3kqQ,7988
28
- listpick-0.1.13.45.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
- listpick-0.1.13.45.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
30
- listpick-0.1.13.45.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
31
- listpick-0.1.13.45.dist-info/RECORD,,
25
+ listpick/utils/utils.py,sha256=bEE7-g3cyZd4QFHOxo4P6lXmuo0NwHTS_ovFC92po5w,13826
26
+ listpick-0.1.13.46.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
27
+ listpick-0.1.13.46.dist-info/METADATA,sha256=xWj-5FqRnQ_LqptouDcoVlHJ8Sngx6fdQuMxEINwS4M,7988
28
+ listpick-0.1.13.46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
+ listpick-0.1.13.46.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
30
+ listpick-0.1.13.46.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
31
+ listpick-0.1.13.46.dist-info/RECORD,,