From: Nit Khair Date: 2008-11-11T16:21:50+09:00 Subject: Re: Roguelike project? Nit Khair wrote: > Michael Fellinger wrote: >> On Tue, Nov 11, 2008 at 12:28 AM, Nit Khair >> wrote: >> >> I fixed that just today, check it out :) >> http://github.com/manveru/ver/commit/9fb04aa943e03850c19b0352b519d885826e7f44 >> >> ^ manveru > > I've only integrated the count_map as yet. > > Absolutely brilliant. Works like a dream :-D manver, macros were not working for me. Are they working with you? I traced it down to the line in keymap.rb > @keys << Key.new(*args, &block) where the key was created but not getting inserted into @keys. Finally, I found that key assignments, when inspected, show "e" (for key e), whereas a macro for e will show ["e"]. So i tried flattening and its worked out. Don't know the impact of this, though. def map(*args, &block) if block_given? > args.flatten! > @keys << Key.new(args, &block) else self[*args] end end btw, the sample vi.rb that you gave has the count_map lines for up and down mapped incorrectly (up is mapped to down, and vice-versa) Thanks. -- Posted via http://www.ruby-forum.com/.