This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: is this a bug of vim?
- From: "Matt Wozniski" <godlygeek at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 11 Sep 2008 20:20:40 -0400
- Subject: Re: is this a bug of vim?
- References: <20080911115134.GA660@GUO>
2008/9/11 goooguo:
> hi,
> When I open a file by ":tag indent" or "g]", vim complains that
> "Unable to open swap file, recovery impossible", which is very annoying.
> However, if I open a file via ":edit fname" or ":tabedit fname", no error
> message will be issued.
>
> My vim version is 7.2 huge. Vim installed from cygwin package by running
> setup.exe has this problem as well as built from source code by myself.
>
> My vim directory is set to be ".,~/tmp,/var/tmp,/tmp", and each disk
> drive is symbolly linked to "cygdrive/xxx".
>
> After tracing, I found vim try to open ".e:\\lab\\git_lab\\SAMTuner\\vecfile.cpp.swp".
<snip end of backtrace>
> #7 0x0043b9aa in getfile (fnum=0, ffname=0x10036398 "/cygdrive/e/lab/git_lab/SAMTuner/vecfile.cpp",
> sfname=0x1012adf0 "e:\\lab\\git_lab\\SAMTuner\\vecfile.cpp", setpm=1, lnum=0, forceit=0) at ex_cmds.c:3056
> #8 0x0052458e in do_tag (tag=0x1012cac4 "SaveFile", type=10, count=0, forceit=0, verbose=0) at tag.c:3132
> #9 0x0047ba0f in cs_find_common (opt=0x570e26 "g", pat=0x1012cac4 "SaveFile", forceit=0, verbose=0, use_ll=0)
> at if_cscope.c:1160
> #10 0x0047c018 in do_cstag (eap=0x22c580) at if_cscope.c:184
> #11 0x0044c041 in ex_tag_cmd (eap=0x10153a70, name=0x22c580 "æ\022\020") at ex_docmd.c:9309
> #12 0x1012cac0 in ?? ()
It looks to me that this is happening because your cscope.out file
contains windows-style paths. Is that the case? If so, you should
know that cygwin only supports the use of posix-style paths. That
being said, this patch defeats the entire point of having both a
"short" file name (ie, the one the user used) and a full file name
(ie, fully qualified). So, normally, if you were to do :e hello.c,
then sfname would be set to 'hello.c' and ffname would be set to
$PWD/hello.c; this patch completely breaks that.
~Matt