mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-23 05:11:35 +03:00
tabbing: beep at the first listing, and when there are zero possibilities
A successful single completion is silent, but when there are zero or multiple possibilities, nano beeps.
This commit is contained in:
parent
3f63982593
commit
94f49e208f
@ -2555,7 +2555,8 @@ char *input_tab(char *buf, size_t *place, void (*refresh_func)(void), bool *list
|
||||
memmove(buf + common_len, buf + *place, 1);
|
||||
strncpy(buf, mzero, common_len);
|
||||
*place = common_len;
|
||||
}
|
||||
} else if (num_matches == 1)
|
||||
beep();
|
||||
|
||||
/* If there is more than one possible completion, show a sorted list. */
|
||||
if (num_matches > 1) {
|
||||
@ -2563,6 +2564,9 @@ char *input_tab(char *buf, size_t *place, void (*refresh_func)(void), bool *list
|
||||
size_t nrows, ncols;
|
||||
int row;
|
||||
|
||||
if (!*listed)
|
||||
beep();
|
||||
|
||||
qsort(matches, num_matches, sizeof(char *), diralphasort);
|
||||
|
||||
/* Find the length of the longest name among the matches. */
|
||||
|
Loading…
Reference in New Issue
Block a user