X Tutup
Skip to content

Commit 1934a83

Browse files
update config for scroll->curtsies name change
--HG-- branch : scroll-frontend
1 parent 615ed80 commit 1934a83

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bpython/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def loadini(struct, configfile):
9696
'suggestion_width': 0.8,
9797
'trim_prompts': False,
9898
},
99-
'scroll': {
99+
'curtsies': {
100100
'list_above' : False,
101101
'fill_terminal' : False,
102102
},
@@ -163,8 +163,8 @@ def loadini(struct, configfile):
163163

164164
struct.gtk_font = config.get('gtk', 'font')
165165

166-
struct.scroll_list_above = config.getboolean('scroll', 'list_above')
167-
struct.scroll_fill_terminal = config.getboolean('scroll', 'fill_terminal')
166+
struct.curtsies_list_above = config.getboolean('curtsies', 'list_above')
167+
struct.curtsies_fill_terminal = config.getboolean('curtsies', 'fill_terminal')
168168

169169
color_scheme_name = config.get('general', 'color_scheme')
170170
color_gtk_scheme_name = config.get('gtk', 'color_scheme')

bpython/curtsiesfrontend/repl.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self, locals_=None, config=None, stuff_a_refresh_request=lambda: No
136136
if config.cli_suggestion_width <= 0 or config.cli_suggestion_width > 1:
137137
config.cli_suggestion_width = 1
138138

139-
self.status_bar = StatusBar(banner if config.scroll_fill_terminal else '', _(
139+
self.status_bar = StatusBar(banner if config.curtsies_fill_terminal else '', _(
140140
" <%s> Rewind <%s> Save <%s> Pastebin <%s> Editor"
141141
) % (config.undo_key, config.save_key, config.pastebin_key, config.external_editor_key))
142142
self.rl_char_sequences = get_updated_char_sequences(key_dispatch, config)
@@ -612,14 +612,14 @@ def paint(self, about_to_exit=False):
612612
self.clean_up_current_line_for_exit() # exception to not changing state!
613613

614614
width, min_height = self.width, self.height
615-
show_status_bar = bool(self.status_bar._message) or (self.config.scroll_fill_terminal or self.status_bar.has_focus)
615+
show_status_bar = bool(self.status_bar._message) or (self.config.curtsies_fill_terminal or self.status_bar.has_focus)
616616
if show_status_bar:
617617
min_height -= 1
618618

619619
current_line_start_row = len(self.lines_for_display) - max(0, self.scroll_offset)
620620
if self.request_paint_to_clear_screen: # or show_status_bar and about_to_exit ?
621621
self.request_paint_to_clear_screen = False
622-
if self.config.scroll_fill_terminal: #TODO clean up this logic - really necessary check?
622+
if self.config.cursties_fill_terminal: #TODO clean up this logic - really necessary check?
623623
arr = FSArray(self.height - 1 + current_line_start_row, width)
624624
else:
625625
arr = FSArray(self.height + current_line_start_row, width)
@@ -683,15 +683,15 @@ def paint(self, about_to_exit=False):
683683
info_max_rows = max(visible_space_above, visible_space_below)
684684
infobox = paint.paint_infobox(info_max_rows, int(width * self.config.cli_suggestion_width), self.matches, self.argspec, self.current_word, self.docstring, self.config)
685685

686-
if visible_space_above >= infobox.height and self.config.scroll_list_above:
686+
if visible_space_above >= infobox.height and self.config.curtsies_list_above:
687687
arr[current_line_start_row - infobox.height:current_line_start_row, 0:infobox.width] = infobox
688688
else:
689689
arr[cursor_row + 1:cursor_row + 1 + infobox.height, 0:infobox.width] = infobox
690690
logging.debug('slamming infobox of shape %r into arr of shape %r', infobox.shape, arr.shape)
691691

692692
logging.debug('about to exit: %r', about_to_exit)
693693
if show_status_bar:
694-
if self.config.scroll_fill_terminal:
694+
if self.config.curtsies_fill_terminal:
695695
if about_to_exit:
696696
arr[max(arr.height, min_height), :] = FSArray(1, width)
697697
else:

doc/sphinx/source/configuration-options.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ Default: Monospace 10
259259

260260
The font to be used by the GTK version.
261261

262-
scroll
263-
------
264-
This refers to the ``[scroll]`` section in your config file.
262+
curtsies
263+
--------
264+
This refers to the ``[curtsies]`` section in your config file.
265265

266266
.. versionadded:: 0.13
267267

0 commit comments

Comments
 (0)
X Tutup