Skip to content

Commit 84ac7a2

Browse files
committed
Fixed 341 right arrow suggestion color
1 parent ec8a32e commit 84ac7a2

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

bpython/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def loadini(struct, configfile):
178178
'paren': 'R',
179179
'prompt': 'c',
180180
'prompt_more': 'g',
181+
'right_arrow_suggestion': 'K',
181182
}
182183

183184
if color_scheme_name == 'default':

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,8 @@ def current_cursor_line_without_suggestion(self):
948948
@property
949949
def current_cursor_line(self):
950950
if self.config.curtsies_right_arrow_completion:
951-
return self.current_cursor_line_without_suggestion + fmtfuncs.bold(fmtfuncs.dark((self.current_suggestion)))
951+
return (self.current_cursor_line_without_suggestion +
952+
func_for_letter(self.config.color_scheme['right_arrow_suggestion'])(self.current_suggestion))
952953
else:
953954
return self.current_cursor_line_without_suggestion
954955

doc/sphinx/source/themes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Available Switches
3838
* main
3939
* prompt
4040
* prompt_more
41+
* right_arrow_suggestion
4142

4243
Default Theme
4344
-------------
@@ -74,6 +75,7 @@ The default theme included in bpython is as follows:
7475
main = c
7576
prompt = c
7677
prompt_more = g
78+
right_arrow_suggestion = K
7779
7880
.. :: Footnotes
7981

light.theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ output = b
2626
main = b
2727
prompt = r
2828
prompt_more = g
29+
right_arrow_suggestion = K

sample.theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ output = w
2727
main = c
2828
prompt = c
2929
prompt_more = g
30+
right_arrow_suggestion = K

0 commit comments

Comments
 (0)