about summary refs log tree commit diff
path: root/Src/Zle/zle_tricky.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-18 12:11:38 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-18 12:11:38 +0000
commiteb85a72ad95cfa0bf6c39b806407c34946c71a2d (patch)
tree90aa146c679dbaed13b823746b230b55e9c0b5e3 /Src/Zle/zle_tricky.c
parent42510013b1630c620caeb7894d3fa2b46862cf56 (diff)
downloadzsh-eb85a72ad95cfa0bf6c39b806407c34946c71a2d.tar.gz
zsh-eb85a72ad95cfa0bf6c39b806407c34946c71a2d.tar.xz
zsh-eb85a72ad95cfa0bf6c39b806407c34946c71a2d.zip
zsh-workers/8322
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r--Src/Zle/zle_tricky.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 84f61e002..85e592045 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -7835,7 +7835,7 @@ cut_cline(Cline l)
 	    q = p;
     }
     if (!e && q && !q->orig && !q->olen && (q->flags & CLF_MISS) &&
-	(q->word ? q->wlen : q->llen) < 3) {
+	!(q->flags & CLF_MATCHED) && (q->word ? q->wlen : q->llen) < 3) {
 	q->word = q->line = NULL;
 	q->wlen = q->llen = 0;
     }
@@ -8452,7 +8452,8 @@ do_single(Cmatch m)
 	    if (m->flags & CMF_PARNEST)
 		havesuff = 1;
 	}
-	if ((m->flags & CMF_FILE) || (partest && isset(AUTOPARAMSLASH))) {
+	if (((m->flags & CMF_FILE) || (partest && isset(AUTOPARAMSLASH))) &&
+	    cs > 0 && line[cs - 1] != '/') {
 	    /* If we have a filename or we completed a parameter name      *
 	     * and AUTO_PARAM_SLASH is set, lets see if it is a directory. *
 	     * If it is, we append a slash.                                */