Skip to content

Commit 67907d6

Browse files
committed
Mess with colors in the completion tooltip.
1 parent 42859d0 commit 67907d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bpython/urwid.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ def _populate_completion(self, main_loop, user_data):
287287
else:
288288
text = ''
289289
if self.matches:
290-
texts = [urwid.Text(match) for match in self.matches]
290+
texts = [urwid.Text(('main', match))
291+
for match in self.matches]
291292
width = max(text.pack()[0] for text in texts)
292293
gridflow = urwid.GridFlow(texts, width, 1, 0, 'left')
293294
widget_list[1] = gridflow
@@ -434,6 +435,7 @@ def main(args=None, locals_=None, banner=None):
434435

435436
tooltip = urwid.ListBox(urwid.SimpleListWalker([
436437
urwid.Text(''), urwid.Text('')]))
438+
# TODO: this linebox should use the 'main' color.
437439
overlay = Tooltip(urwid.LineBox(tooltip), listbox,
438440
'left', ('relative', 100),
439441
('fixed top', 0), ('fixed bottom', 0))

0 commit comments

Comments
 (0)