Skip to content

Commit c84a492

Browse files
fix scrollbar color and left justify text
--HG-- branch : scroll-frontend extra : rebase_source : 560a99cd2adf1ae0ecdf7d7d868219e44c94bb2a
1 parent c92116e commit c84a492

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bpython/scrollfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def paint(self, about_to_exit=False):
496496
logging.debug('slamming infobox of shape %r into arr', infobox.shape)
497497

498498
if show_status_bar and not about_to_exit:
499-
arr[max(arr.height, min_height), :] = paint.paint_statusbar(1, width, self.status_bar.current_line)
499+
arr[max(arr.height, min_height), :] = paint.paint_statusbar(1, width, self.status_bar.current_line, self.config)
500500
return arr, (cursor_row, cursor_column)
501501

502502
## Debugging shims

bpython/scrollfrontend/replpainter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
from fmtstr.fmtfuncs import *
33
from fmtstr.fsarray import fsarray
4+
from fmtstr.bpythonparse import func_for_letter
45

56
import logging
67

@@ -71,8 +72,8 @@ def paint_infobox(rows, columns, matches, argspec, match, docstring, config):
7172
#return r
7273
return fsarray(r[:rows-1, :])
7374

74-
def paint_statusbar(rows, columns, msg):
75-
return fsarray([on_green(blue(msg.center(columns)))])
75+
def paint_statusbar(rows, columns, msg, config):
76+
return fsarray([func_for_letter(config.color_scheme['main'])(msg.ljust(columns))])
7677

7778
if __name__ == '__main__':
7879
#paint_history(10, 30, ['asdf', 'adsf', 'aadadfadf']).dumb_display()

0 commit comments

Comments
 (0)