danchoi / vmail

a vim interface for gmail
http://danielchoi.com/software/vmail.html
MIT License
786 stars 60 forks source link

undefined method `ljust` in call to String#col extension method #200

Open danchoi opened 8 years ago

danchoi commented 8 years ago

Reported to me directly by @haby:

I conclude it is caused by a negative value for the width parameter to String#col lib/vmail/string_ext.rb. The log below shows the window width to be 31.

D, [2016-02-10T15:56:47.077406 #2611] DEBUG -- : Setting window width to 31
D, [2016-02-10T15:56:47.159503 #2611] DEBUG -- : #search: "all"
D, [2016-02-10T15:56:47.159606 #2611] DEBUG -- : Query: "769:868 all"
D, [2016-02-10T15:56:47.344956 #2611] DEBUG -- : - Query got 100 results; max seqno: 868
D, [2016-02-10T15:56:47.345044 #2611] DEBUG -- : Clearing cached message
D, [2016-02-10T15:56:47.345081 #2611] DEBUG -- : Fetching headers for 100 messages
D, [2016-02-10T15:56:48.063727 #2611] DEBUG -- : ERROR:
#<NoMethodError: undefined method `ljust' for nil:NilClass>
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/string_ext.rb:3:in `col'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:94:in `format_header_for_list'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `block in get_message_headers'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `map'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `get_message_headers'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/searching.rb:43:in `search'

Fix pending.

danchoi commented 8 years ago

@notalex Hi Alex, could you review this change and bump up the gem version when you're ready? Thank you.

notalex commented 8 years ago

Sure. Will review in a few hours.

danchoi commented 8 years ago

No rush.

notalex commented 8 years ago

Version bumped and gem pushed. I believe this is related to the issue https://github.com/danchoi/vmail/issues/199.