Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a90d60

Browse files
Improve fish-style highlighted reverse search
1 parent8fbb11e commit9a90d60

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎bpython/curtsiesfrontend/repl.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ def current_line_formatted(self):
927927
ifself.incremental_search_targetinself.current_line:
928928
fs=fmtfuncs.on_magenta(self.incremental_search_target).join(fs.split(self.incremental_search_target))
929929
elifself.rl_history.saved_lineandself.rl_history.saved_lineinself.current_line:
930-
ifself.config.curtsies_right_arrow_completion:
930+
ifself.config.curtsies_right_arrow_completionandself.rl_history.index!=0:
931931
fs=fmtfuncs.on_magenta(self.rl_history.saved_line).join(fs.split(self.rl_history.saved_line))
932932
logger.debug('Display line %r -> %r',self.current_line,fs)
933933
else:
@@ -1203,6 +1203,8 @@ def __repr__(self):
12031203
def_get_current_line(self):
12041204
returnself._current_line
12051205
def_set_current_line(self,line,update_completion=True,reset_rl_history=True,clear_special_mode=True):
1206+
ifself._current_line==line:
1207+
return
12061208
self._current_line=line
12071209
ifupdate_completion:
12081210
self.update_completion()
@@ -1214,7 +1216,7 @@ def _set_current_line(self, line, update_completion=True, reset_rl_history=True,
12141216
"The current line")
12151217
def_get_cursor_offset(self):
12161218
returnself._cursor_offset
1217-
def_set_cursor_offset(self,offset,update_completion=True,reset_rl_history=True,clear_special_mode=True):
1219+
def_set_cursor_offset(self,offset,update_completion=True,reset_rl_history=False,clear_special_mode=True):
12181220
ifupdate_completion:
12191221
self.update_completion()
12201222
ifreset_rl_history:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp