Basti Grembowietz wrote: > >> I'm glad you managed to figure out the problem and suggest a patch. > >> However, I think this is the wrong place to fix it. The "\(" in > >> 'backupskip' must be seen as a special item in the pattern, after all > >> it > >> is a list of patterns and "\(" is a regexp item. > >> > >> We better make sure that when there are special things in $TEMP they > >> are > >> escaped when put in 'backupskip'. So that $TEMP is taken literally. > >> That is in set_init_1(), around line 3000. Perhaps you can make a > >> patch > >> for that? > > After thinking of how escaping the backslash to that it would be > > recogniced > > as such (as adding a simple backslash to the path wouldn't help) I > > decided > > to go the other way round - and replaced the bracket by the > > all-matching '.' > > > > This solution works fine for the matching of the paths and is not too > > much > > overhead. The code is now set to only convert '(' and ')', but can > > easily be > > extended to convert other characters which would break the regex as > > well. > > > > Regards, > > Basti > > Now I also fixed my fix =) Replacing the character in the > directory-string directly by '.' > resulted in an escaped '\.' . I now use '?', this will be translated to > '.'. > > By the way, I noted that in my situation the matching of p_bsk > sometimes does not help > because of Windows abbrevfiated filenames ("C:\Dokum~1\..."). For > example when saving > directly using the full name of the file ("C:\Dokumente und > Einstellungen\..."). But this is another > issue, my patch works great for me.
Looks a bit complicated and doesn't work for all magic characters. How about using vim_strsave_escaped()? -- hundred-and-one symptoms of being an internet addict: 203. You're an active member of more than 20 newsgroups. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///