mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
misc: fix empty character sheet on Linux
This commit is contained in:
@@ -69,10 +69,11 @@ class DataTable(Scrollable):
|
|||||||
if y == self._selected and has_colors():
|
if y == self._selected and has_colors():
|
||||||
self._pad.attron(curses.color_pair(COLOR_HIGHLIGHT))
|
self._pad.attron(curses.color_pair(COLOR_HIGHLIGHT))
|
||||||
self._pad.addnstr(y, 0, row[0], min(len(row[0]), w))
|
self._pad.addnstr(y, 0, row[0], min(len(row[0]), w))
|
||||||
if col2_x < w:
|
# Determine the number of characters to write
|
||||||
self._pad.addnstr(
|
nwrite = min(len(row[1]), w - col2_x)
|
||||||
y, col2_x, row[1], min(len(row[1]), w - col2_x)
|
# Ensure we have enough columns, and we are writing more than zero
|
||||||
)
|
if col2_x < w and nwrite > 0:
|
||||||
|
self._pad.addnstr(y, col2_x, row[1], nwrite)
|
||||||
if y == self._selected and has_colors():
|
if y == self._selected and has_colors():
|
||||||
self._pad.attroff(curses.color_pair(COLOR_HIGHLIGHT))
|
self._pad.attroff(curses.color_pair(COLOR_HIGHLIGHT))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user