From: Vitalie Spinu Date: Mon, 1 Feb 2016 21:29:45 +0000 (+0100) Subject: Kill trailing / on directories completion X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/4f0d7a1477bb1f49f344069328d511e9ad2b85a8 Kill trailing / on directories completion --- diff --git a/company-files.el b/company-files.el index c04985cb5..c19d3d6cb 100644 --- a/company-files.el +++ b/company-files.el @@ -113,6 +113,8 @@ File paths with spaces are only supported inside strings." (candidates (company-files--complete arg)) (location (cons (dired-noselect (file-name-directory (directory-file-name arg))) 1)) + (post-completion (when (company-files--trailing-slash-p arg) + (delete-char -1))) (sorted t) (no-cache t)))