Nikolai Weibull wrote: > I think that find_ident_at_pos contains a bug. The thing is that > expand("<cWORD>") expands to a non-empty string if positioned over a > whitespace character after a WORD at the start of a line, but to an > empty string anywhere else. I doubt that this is intentional, but it > seems that at least the rubycomplete.vim script and the > pythoncomplete.vim script assume that it always expands to a non-empty > string, and perhaps we need to keep this behavior for backwards > compatability. The problem can be remedied in the scripts by backing > the cursor up to the actual word, but that's not a very good solution. > > To try it out, put the following in an empty buffer: > > :x. > > And position the cursor over/at the trailing space. Then execute > > :echo expand('<cWORD>') > > The expansion will be empty. > > Now, change the buffer to contain only > > :x. > > and again position the cursor over/at the trailing space. Again execute > > :echo expand('<cWORD>') > > The expansion will be ':x.'.
I don't see this, the result is empty both times. Are you sure the cursor wasn't on the "."? -- hundred-and-one symptoms of being an internet addict: 95. Only communication in your household is through email. /// 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://www.ICCF.nl ///