summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2016-09-13 23:29:09 +0200
committerGitHub <noreply@github.com>2016-09-13 23:29:09 +0200
commitb58be939d269c72e7f00e75e18fb0619d1dae432 (patch)
tree421355e8b3e6f1dcd9efc1390cdcb51bf94d6288 /src
parentae5e4a94da82082188286604c3d406e15a46e4e0 (diff)
parentdab3246db91a6f17a7da192c10f9b369fa057ef5 (diff)
downloadirssi-b58be939d269c72e7f00e75e18fb0619d1dae432.zip
Merge pull request #516 from LemonBoy/comp-file
Fix the tab completion for paths starting with ./
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/completion.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index 46fd9db7..76dfbb79 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -345,7 +345,9 @@ GList *filename_complete(const char *path, const char *default_path)
(dp->d_name[1] == '.' && dp->d_name[2] == '\0'))
continue; /* skip . and .. */
- if (basename[0] != '.')
+ /* Skip the dotfiles unless the user explicitly asked us
+ * to do so. Basename might be './', beware of that */
+ if (basename[0] != '.' || basename[1] == '\0')
continue;
}