mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Make tab-completion truncation less dumb
Fixes https://github.com/fish-shell/fish-shell/issues/259
This commit is contained in:
parent
1dfa404210
commit
0302162d8e
1 changed files with 4 additions and 4 deletions
|
@ -111,7 +111,7 @@ commence.
|
|||
Maximum length of prefix string when printing completion
|
||||
list. Longer prefixes will be ellipsized.
|
||||
*/
|
||||
#define PREFIX_MAX_LEN 8
|
||||
#define PREFIX_MAX_LEN 9
|
||||
|
||||
/**
|
||||
A simple prompt for reading shell commands that does not rely on
|
||||
|
@ -1556,7 +1556,7 @@ static bool handle_completions( const std::vector<completion_t> &comp )
|
|||
{
|
||||
// append just the end of the string
|
||||
prefix = wcstring(&ellipsis_char, 1);
|
||||
prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN, wcstring::npos);
|
||||
prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN - 1, wcstring::npos);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue