Use clrtoeol to draw blank lines
This commit is contained in:
@@ -811,9 +811,9 @@ class File:
|
||||
x = self.x if line_idx == self.y else 0
|
||||
line = scrolled_line(line, x, curses.COLS)
|
||||
stdscr.insstr(i + margin.header, 0, line)
|
||||
blankline = ' ' * curses.COLS
|
||||
for i in range(to_display, margin.body_lines):
|
||||
stdscr.insstr(i + margin.header, 0, blankline)
|
||||
stdscr.move(i + margin.header, 0)
|
||||
stdscr.clrtoeol()
|
||||
|
||||
if self.select_start is not None:
|
||||
(s_y, s_x), (e_y, e_x) = self._get_selection()
|
||||
|
||||
@@ -148,21 +148,25 @@ class CursesScreen:
|
||||
def keypad(self, val):
|
||||
pass
|
||||
|
||||
def nodelay(self, val):
|
||||
self._runner.screen.nodelay = val
|
||||
|
||||
def insstr(self, y, x, s, attr=0):
|
||||
self._runner.screen.insstr(y, x, s)
|
||||
|
||||
def clrtoeol(self):
|
||||
s = self._runner.screen.width * ' '
|
||||
self.insstr(self._runner.screen.y, self._runner.screen.x, s)
|
||||
|
||||
def chgat(self, y, x, n, color):
|
||||
pass
|
||||
|
||||
def move(self, y, x):
|
||||
self._runner.screen.move(y, x)
|
||||
|
||||
def get_wch(self):
|
||||
return self._runner._get_wch()
|
||||
|
||||
def chgat(self, y, x, n, color):
|
||||
pass
|
||||
|
||||
def nodelay(self, val):
|
||||
self._runner.screen.nodelay = val
|
||||
|
||||
|
||||
class Key(NamedTuple):
|
||||
tmux: str
|
||||
|
||||
Reference in New Issue
Block a user