@@ -927,7 +927,7 @@ def current_line_formatted(self):
927927if self .incremental_search_target in self .current_line :
928928fs = fmtfuncs .on_magenta (self .incremental_search_target ).join (fs .split (self .incremental_search_target ))
929929elif self .rl_history .saved_line and self .rl_history .saved_line in self .current_line :
930- if self .config .curtsies_right_arrow_completion :
930+ if self .config .curtsies_right_arrow_completion and self . rl_history . index != 0 :
931931fs = fmtfuncs .on_magenta (self .rl_history .saved_line ).join (fs .split (self .rl_history .saved_line ))
932932logger .debug ('Display line %r -> %r' ,self .current_line ,fs )
933933else :
@@ -1203,6 +1203,8 @@ def __repr__(self):
12031203def _get_current_line (self ):
12041204return self ._current_line
12051205def _set_current_line (self ,line ,update_completion = True ,reset_rl_history = True ,clear_special_mode = True ):
1206+ if self ._current_line == line :
1207+ return
12061208self ._current_line = line
12071209if update_completion :
12081210self .update_completion ()
@@ -1214,7 +1216,7 @@ def _set_current_line(self, line, update_completion=True, reset_rl_history=True,
12141216"The current line" )
12151217def _get_cursor_offset (self ):
12161218return self ._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 ):
12181220if update_completion :
12191221self .update_completion ()
12201222if reset_rl_history :