Here is a small patch addressing todo item:

7   Output for ":scriptnames" and ":breaklist" should shorten the file names:
    use "~/" when possible.

This is from the 'small problems' list.

I used home_replace() along with NameBuff to compact $HOME to "~/".

HTH,

-- 
JR

-- 
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
diff -r 32b525d86e56 src/ex_cmds2.c
--- a/src/ex_cmds2.c    Sat Apr 30 23:27:03 2011 -0400
+++ b/src/ex_cmds2.c    Sun May 01 17:36:52 2011 -0400
@@ -690,10 +690,12 @@
        for (i = 0; i < dbg_breakp.ga_len; ++i)
        {
            bp = &BREAKP(i);
+           if (bp->dbg_type == DBG_FILE)
+               home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
            smsg((char_u *)_("%3d  %s %s  line %ld"),
                    bp->dbg_nr,
                    bp->dbg_type == DBG_FUNC ? "func" : "file",
-                   bp->dbg_name,
+                   bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
                    (long)bp->dbg_lnum);
        }
 }
@@ -3279,8 +3281,10 @@
     int i;
 
     for (i = 1; i <= script_items.ga_len && !got_int; ++i)
-       if (SCRIPT_ITEM(i).sn_name != NULL)
-           smsg((char_u *)"%3d: %s", i, SCRIPT_ITEM(i).sn_name);
+       if (SCRIPT_ITEM(i).sn_name != NULL) {
+           home_replace(NULL, SCRIPT_ITEM(i).sn_name, NameBuff, MAXPATHL, 
TRUE);
+           smsg((char_u *)"%3d: %s", i, NameBuff);
+        }
 }
 
 # if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)

Raspunde prin e-mail lui