File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1117,7 +1117,7 @@ impl Reedline {
1117
1117
{
1118
1118
Some ( Ok ( ( ) ) ) => {
1119
1119
self . update_buffer_from_history ( ) ;
1120
- // TODO: are these needed/correct?
1120
+ // Move to end of first line, see `Self::previous_history()`.
1121
1121
self . editor . move_to_start ( UndoBehavior :: HistoryNavigation ) ;
1122
1122
self . editor
1123
1123
. move_to_line_end ( UndoBehavior :: HistoryNavigation ) ;
@@ -1188,6 +1188,7 @@ impl Reedline {
1188
1188
. back ( self . history . as_ref ( ) )
1189
1189
. expect ( "todo: error handling" ) ;
1190
1190
self . update_buffer_from_history ( ) ;
1191
+ // Move to end of *first* line, so that pressing up again goes directly to previous item.
1191
1192
self . editor . move_to_start ( UndoBehavior :: HistoryNavigation ) ;
1192
1193
self . editor
1193
1194
. move_to_line_end ( UndoBehavior :: HistoryNavigation ) ;
You can’t perform that action at this time.
0 commit comments