On 2016-04-15, Gary Johnson wrote: > On 2016-04-15, Gary Johnson wrote: > > On 2016-04-15, Bram Moolenaar wrote: > > > Gary Johnson wrote: > > > > > > > The gD appears to be broken in 7.4.1743 when 'ignorecase' is set. > > > > > > > > In the following example, with the cursor on "fileName" in the last > > > > line, typing gD should move the cursor to the second line, where > > > > fileName is defined. Instead, it jumps to FileName on the first > > > > line. > > > > > > > > FileName fileA; > > > > char* fileName; > > > > > > > > fileName = "hello.txt"; > > > > > > > > gD is not performing an arbitrary search; it is searching for a > > > > symbol. It should not be affected by 'ignorecase'. > > > > > > > > This used to work properly. I don't know exactly when it broke. It > > > > works in 7.4.160. It fails in 7.4.1655. > > > > > > > > In 7.4.1709, I have one window in which it works and one window in > > > > which it fails and I don't see any difference between the two > > > > windows. > > > > > > AFAIK this didn't change. Perhaps you had gD mapped to reset > > > 'ignorecase'? > > > > I suspected a mapping, too, but ":map gD" says, "No mapping found". > > > > I don't use gD frequently, but it's always "just worked", until > > today. I discovered the issue in a vim instance still running > > 7.4.1709 right after I had updated that system to 7.4.1743. > > > > My ~/.vimrc sets 'ignorecase' and 'smartcase' and has for quite a > > while. > > > > There has been some fiddling with the scope of 'smartcase' recently. > > I thought this might be some collateral damage from that. > > Well, this is frustrating. I just tried constructing a simple > command that would demonstrate the problem so that I could do a > Mercurial binary search for the offending patch. Now I can't get it > to fail. I can see it failing in one of my vim sessions, but I > can no longer make it fail in a new session. I wonder what I did > earlier this afternoon that I'm not doing now. > > I'll try to play with it some more and get a reliably reproducible > test case.
The problem with my test case was that gD will not jump to a symbol if it is at the very beginning of a buffer and my test file began with "FileName" at the start of the first line. In that case, gD would always jump to the "fileName" definition on the second line. With that understanding and a properly constructed test file, I see that gD "fails" even in 7.4.160. It must have "just worked" until now because I happened to never search for a global symbol definition that was preceded in the file by the same word in a different case. Is it expected or desired that gD is affected by 'ignorecase'? Regards, Gary -- -- 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.
