bug removal

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

bug removal

Mark Guzman
Doug,
  I think I've taken care of the bug you found. I wasn't holding onto
the input to remove invalid candidates.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
On Mon, Apr 24, 2006 at 08:26:20PM -0400, Mark Guzman wrote:
> Doug,
>   I think I've taken care of the bug you found. I wasn't holding onto
> the input to remove invalid candidates.

Thanks. It seems that it now only works with leading whitespace though.

Something like this fails.

x = S<C-x><C-o>

but this works

S<C-x><C-o>

Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
On Tue, Apr 25, 2006 at 11:24:09PM +1000, Doug Kearns wrote:
> On Mon, Apr 24, 2006 at 08:26:20PM -0400, Mark Guzman wrote:
> > Doug,
> >   I think I've taken care of the bug you found. I wasn't holding onto
> > the input to remove invalid candidates.
>
> Thanks. It seems that it now only works with leading whitespace though.

I just had a quick look at this and it seems to be due to the
'workaround' code you introduced in r1.4. Since this cWORD expansion bug
has now been fixed in Vim is it still required for any reason?

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Mark Guzman
Doug Kearns wrote:
> I just had a quick look at this and it seems to be due to the
> 'workaround' code you introduced in r1.4. Since this cWORD expansion bug
> has now been fixed in Vim is it still required for any reason?
>  
Thats actually necessary, I may remove the cWORD expansion. cWord will
only pull the word after the cursor, so in cases like "abc.<complete
here>" we would be passed an empty string
and in general we want to know that "abc" was part of the completion.
The main problem is the assignment. I assume you'd like it to complete
the list of globals.
The bug your seeing stems from those two issues, expand("cWORD") -> ""
and the line is "x = S". "x=S" ends up being processed,
but doesn't strip off the "x=", so it finds no valid completions. I'll
add some code to strip off the assignment.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
On Tue, Apr 25, 2006 at 11:22:50AM -0400, Mark Guzman wrote:
> Doug Kearns wrote:
> > I just had a quick look at this and it seems to be due to the
> > 'workaround' code you introduced in r1.4. Since this cWORD expansion bug
> > has now been fixed in Vim is it still required for any reason?
> >  
> Thats actually necessary, I may remove the cWORD expansion. cWord will
> only pull the word after the cursor, so in cases like "abc.<complete
> here>" we would be passed an empty string
> and in general we want to know that "abc" was part of the completion.

Hmmm, I assumed it would behave like <i_Ctrl-o>:echo expand('<cWORD'>) but it
does not...

> The main problem is the assignment. I assume you'd like it to complete
> the list of globals.

Yes, but that really needs a pretty general solution. eg. "x + S"

FWIW, I notice that irb doesn't work with "x+S" but does with "x + S".

> The bug your seeing stems from those two issues, expand("cWORD") -> ""
> and the line is "x = S". "x=S" ends up being processed,
> but doesn't strip off the "x=", so it finds no valid completions. I'll
> add some code to strip off the assignment.

Thanks for your responsiveness. ;-)

Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
Mark,

There's another related problem.

Something like:

x.<C-o><C-x> { |foo| puts foo }

fails because <cWORD> expands to the following "{".

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Mark Guzman
Doug Kearns wrote:
> Something like:
>
> x.<C-o><C-x> { |foo| puts foo }
>
> fails because <cWORD> expands to the following "{".
>  
Doug,
  I've removed the cWORD expansion, and tested versus that example and a
few others. If you get a chance test the current cvs head.
It should be able to handle that case, "x=b.<C-o><C-x>+a", "x =
b.<C-o><C-x> + a", and "a.foo( b.<C-o><C-x>".
In addition, I stripped out a lot of junk in an effort to trim the
filesize a bit without changing the indentation.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
On Wed, Apr 26, 2006 at 10:46:12AM -0400, Mark Guzman wrote:

> Doug Kearns wrote:
> > Something like:
> >
> > x.<C-o><C-x> { |foo| puts foo }
> >
> > fails because <cWORD> expands to the following "{".
> >  
> Doug,
>   I've removed the cWORD expansion, and tested versus that example and a
> few others. If you get a chance test the current cvs head.
> It should be able to handle that case, "x=b.<C-o><C-x>+a", "x =
> b.<C-o><C-x> + a", and "a.foo( b.<C-o><C-x>".

Great. These all work well for me.

However, this example is now completing incorrectly.

x = "foo"
x.chop! <C-o><C-x>

offers _only_ "chop!" in the completion list.

> In addition, I stripped out a lot of junk in an effort to trim the
> filesize a bit without changing the indentation.

Don't worry too much about the file size. I just stripped the whitespace
because it wasn't doing anything useful. ;-) If the comments are useful
to you go for it!

Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Doug Kearns
On Thu, Apr 27, 2006 at 01:08:38AM +1000, Doug Kearns wrote:

<snip>

> > It should be able to handle that case, "x=b.<C-o><C-x>+a", "x =
> > b.<C-o><C-x> + a", and "a.foo( b.<C-o><C-x>".

This is also broken:

a.foo( b.bar, b.<C-o><C-x>

it offers only methods starting with bar.

<snip>

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug removal

Mark Guzman
Doug Kearns wrote:
> This is also broken:
>
> a.foo( b.bar, b.<C-o><C-x>
>
> it offers only methods starting with bar.
>
>  
Doug,
  Thanks for testing so quickly. I believe I have just checked in a
version that takes care of the two issues you found.
I've found another issue, involving Range definitions which I'm looking
into.

a = 1..10
a.<C-x><C-o>
returns string's list as its guessing.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel