@@ -643,14 +643,16 @@ def yank_from_buffer(self):
643
643
644
644
def up_one_line (self ):
645
645
self .rl_history .enter (self .current_line )
646
- self ._set_current_line (self .rl_history .back (False , search = self .config .curtsies_right_arrow_completion ),
647
- reset_rl_history = False )
646
+ self ._set_current_line (tabs_to_spaces (self .rl_history .back (False ,
647
+ search = self .config .curtsies_right_arrow_completion )),
648
+ reset_rl_history = False )
648
649
self ._set_cursor_offset (len (self .current_line ), reset_rl_history = False )
649
650
650
651
def down_one_line (self ):
651
652
self .rl_history .enter (self .current_line )
652
- self ._set_current_line (self .rl_history .forward (False , search = self .config .curtsies_right_arrow_completion ),
653
- reset_rl_history = False )
653
+ self ._set_current_line (tabs_to_spaces (self .rl_history .forward (False ,
654
+ search = self .config .curtsies_right_arrow_completion )),
655
+ reset_rl_history = False )
654
656
self ._set_cursor_offset (len (self .current_line ), reset_rl_history = False )
655
657
656
658
def process_simple_keypress (self , e ):
@@ -1369,6 +1371,9 @@ def key_help_text(self):
1369
1371
def is_nop (char ):
1370
1372
return unicodedata .category (unicode (char )) == 'Cc'
1371
1373
1374
+ def tabs_to_spaces (line ):
1375
+ return line .replace ('\t ' , ' ' )
1376
+
1372
1377
def compress_paste_event (paste_event ):
1373
1378
"""If all events in a paste event are identical and not simple characters, returns one of them
1374
1379
0 commit comments