sjbach / lusty

LustyExplorer / LustyJuggler for Vim
http://www.vim.org/scripts/script.php?script_id=1890
257 stars 30 forks source link

Lusty Juggler Needs a Filter #15

Closed sorin-ionescu closed 13 years ago

sorin-ionescu commented 13 years ago

Lusty Juggler should not be listing utility buffers like, for example, __Tag_List__.

sjbach commented 13 years ago

Agreed.

DataWraith commented 13 years ago

Apologies if this is obvious to you already, but ignoring all buffers that are not supposed to be listed should do the trick:

class Buffer
  def listed?
    VIM::nonzero? VIM::evaluate("getbufvar(#{number()}, '&buflisted')")
  end
 end 

I'm not sure where in the code the attribute should best be checked, though.

sjbach commented 13 years ago

Yep, that should do the trick. I'll try to test a patch.

sjbach commented 13 years ago

Should be fixed in [29da037].