File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1764,22 +1764,22 @@ def _pad_matches_to_display(matches_to_display):
17641764 Adds padding to the matches being displayed as tab completion suggestions.
17651765 The default padding of readline/pyreadine is small and not visually appealing
17661766 especially if matches have spaces. It appears very squished together.
1767+
17671768 :param matches_to_display: the matches being padded
1768- :return: the padded matches and length of padding
1769+ :return: the padded matches and length of padding that was added
17691770 """
1771+ if rl_type == RlType .NONE :
1772+ return matches_to_display , 0
1773+
17701774 if rl_type == RlType .GNU :
17711775 # Add 2 to the padding of 2 that readline uses for a total of 4.
17721776 padding = 2 * ' '
1773- return [cur_match + padding for cur_match in matches_to_display ], len (padding )
17741777
17751778 elif rl_type == RlType .PYREADLINE :
17761779 # Add 3 to the padding of 1 that pyreadline uses for a total of 4.
17771780 padding = 3 * ' '
1778- return [cur_match + padding for cur_match in matches_to_display ], len (padding )
17791781
1780- else :
1781- # This function is meaningless without readline
1782- return matches_to_display , 0
1782+ return [cur_match + padding for cur_match in matches_to_display ], len (padding )
17831783
17841784 def _display_matches_gnu_readline (self , substitution , matches , longest_match_length ):
17851785 """
You can’t perform that action at this time.
0 commit comments