fix electric key ~ behavior in filename completion

This commit is contained in:
Charlie Gordon 2024-09-07 13:16:10 +02:00
commit 08fc3e80e9

2
qe.c
View file

@ -7461,7 +7461,7 @@ static void do_minibuffer_electric_key(EditState *s, int key, int argval) {
/* erase beginning of line if typing / or ~ in certain places */
// XXX: behavior on yank should be customized too
if (mb && mb->completion && (mb->completion->flags & CF_FILENAME)
&& eb_nextc(s->b, 0, &offset) == '/') {
&& ((c = eb_nextc(s->b, 0, &offset)) == '/' || c == '~')) {
stop = s->offset;
c = eb_prevc(s->b, s->offset, &offset);
if (c == '/') {