X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <17393e3e0809111720l6ea19d33n584dc405dd6e4fab@mail.gmail.com> Date: Thu, 11 Sep 2008 20:20:40 -0400 From: "Matt Wozniski" To: cygwin AT cygwin DOT com Subject: Re: is this a bug of vim? In-Reply-To: <20080911115134.GA660@GUO> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline References: <20080911115134 DOT GA660 AT GUO> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id m8C0LP34029758 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".> #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 filecontains windows-style paths. Is that the case? If so, you shouldknow that cygwin only supports the use of posix-style paths. Thatbeing 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