On Di, 30 Okt 2018, Marius Gedminas wrote:
> On Tue, Oct 30, 2018 at 08:41:05AM +0100, Christian Brabandt wrote: > > On Mo, 29 Okt 2018, Bram Moolenaar wrote: > > > Thanks. It would be helpful to add a few comments. E.g., why is the > > > buffer size sufficient? I suppose because home_replace() can only make > > > it shorter (is that actually true?). > > > > Yes, it was my understanding of the home_replace() function, that the > > result can only be shorter (if it replaced anything, else the buffer > > would not be modified). > > On some systems root's HOME is /. It would be a shame if home_replace > replaced /foo with ~/foo, making it one character longer. I hope it's > smart enough not to do that, but the actual C is too impenetrable for an > amateur like me to understand. I just tested it (with and w/o my patch) running HOME=/ vim --cmd ':cd /tmp' /testfile (the :cd makes sure, that the :ls will output the absolute path). Running `:ls` (which will call home_replace), did not change the behaviour. Best, Christian -- Frau Meier will ihrer Nachbarin zeigen, wie toll ihr Sohn schon rechnen kann: F. M.: "Fritz, was ist drei mal vier?" Fritz: "zehn?" F. M.: "Sehen sie, nur um eins verrechnet!" -- -- 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]. For more options, visit https://groups.google.com/d/optout.
