ryanflannery / vitunes

A curses media indexer and player for vi users
http://www.vitunes.org
Other
58 stars 5 forks source link

Added 256 colors support #19

Closed ok100 closed 12 years ago

ok100 commented 12 years ago

I added support for 256 colors. Example usage :color bars=color8,default

ryanflannery commented 12 years ago

When attempting :color library=color10,color20, I get a segmentation fault.

ryanflannery commented 12 years ago

Created branch 256colors for this, and added a check to make sure in colorN, N was in [-1,255].

Unfortunately, using these colorN's do not appear to work. I've verified that my setup has 256 color support (works in vim), but this doesn't appear to work. Thoughts? I'll keep digging.

ok100 commented 12 years ago

It works here without any problems (I'm using Archlinux). Here's a screenshot: http://bit.ly/y45lGb

ryanflannery commented 12 years ago

Damn that looks good. I'm jealous.

Ok it has to be on my side, something with my setup. Let me investigate.

ryanflannery commented 12 years ago

In the screenshot you sent, what is the script running in the bottom window, showing the various rgb colors? I'd love to use that for testing.

ryanflannery commented 12 years ago

Mind if that screenshot goes on the website?

ok100 commented 12 years ago

Sure, you can put it anywhere you want. For the script, here you go: http://bit.ly/wLqtKO

What terminal app do you use?

ryanflannery commented 12 years ago

I'm using xterm patch #270, on OpenBSD 5.0. The various 256 color scripts I've tried (including yours) all work, as does 256 color in vim. Not sure where the problem is exactly, but hopefully this week I can dig in.

ryanflannery commented 12 years ago

I had to reset my $TERM. Didn't think to do since scripts & vim had 256 color, but I forgot they don't use the ncurses api for that.

Will go ahead and merge with master.