Skip to content

Commit

Permalink
Don't do TAB filename expansion in contexts where it
Browse files Browse the repository at this point in the history
doesn't make sense, like long option names, numbers, etc.
  • Loading branch information
gwsw committed Dec 29, 2021
1 parent d55edc5 commit 3a90a3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,10 @@ cmd_edit(c)
flags |= ECF_NOHISTORY;
#endif
#if TAB_COMPLETE_FILENAME
if (curr_mlist == ml_search)
if (curr_mlist == ml_search || curr_mlist == NULL)
/*
* In a search command; don't accept file-completion cmds.
* Don't accept file-completion cmds in contexts
* such as search pattern, digits, long option name, etc.
*/
flags |= ECF_NOCOMPLETE;
#endif
Expand Down

0 comments on commit 3a90a3b

Please sign in to comment.