Re: [vim/vim] The absolute path of the auto-suggested file is displayed too long (Issue #21080)

zeertzjq (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/issues/21080/[email protected]>
zeertzjq left a comment (vim/vim#21080)

The following change will make it a home-relative path:
```diff
diff --git a/src/insexpand.c b/src/insexpand.c
index 203ea6fc3..4cb8306e2 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1041,7 +1041,7 @@ ins_compl_add(
 	match->cp_fname = compl_curr_match->cp_fname;
     else if (fname != NULL)
     {
-	match->cp_fname = vim_strsave(fname);
+	match->cp_fname = home_replace_save(NULL, fname);
 	flags |= CP_FREE_FNAME;
     }
     else
```
I'm not sure if that's short enough.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/21080#issuecomment-5323298921
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/issues/21080/[email protected]>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/21080/5323298921%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.