fenetikm / falcon

A colour scheme for terminals, Vim and friends.
MIT License
719 stars 26 forks source link

Inverted colors #8

Closed Zach-Johnson closed 6 years ago

Zach-Johnson commented 6 years ago

Hi - It seems like in a recent update, the background colors were inverted for splits. Previously, the darker background would be on the split that I was currently editing and now it appears to be a gray color on the editing buffer and the black background on the other split. Is that intentional? I much preferred the dark background on the split that I was currently editing.

image

fenetikm commented 6 years ago

Hmmm, strange. The intention is indeed for the active window to be dark and that's what I am seeing. Are you using Vim or NeoVim? Are you running inside of tmux? Can you please give me any other relevant environment information?

Zach-Johnson commented 6 years ago

I'm using NeoVim inside of iTerm 2 without tmux on a mac running El Capitan. I'll see if I can put together a minimal config to reproduce the issue.

fenetikm commented 6 years ago

Cool - I have just opened exactly the same - iTerm2, Tmux, Neovim and it looks fine and the active background changes as expected. It's most probably a config difference between our two configs. Do you see the problem when just inside of NeoVim without Tmux? Would be good to pull Tmux out of the equation.

fenetikm commented 6 years ago

Actually one question that comes to mind, which version of NeoVim are you running? The current way that I am doing the activewindow colour adjustment is NeoVim specific.

Zach-Johnson commented 6 years ago

I probably didn't make that clear, I'm not using tmux, just NeoVim inside iTerm2. NeoVim version is 0.2.2. I re-created the issue with a config that just pulls in the plugin and with set termguicolors enabled, which seems to be part of the issue. It seems that with termguicolors enabled, the background pulls from whatever the background is on iTerm, and the inactive split gets the Falcon background, and without termguicolors set, all backgrounds (active or inactive) are pulling from my iTerm background.

fenetikm commented 6 years ago

ahhh - yeah, set termguicolors is required to be set as that gives 24-bit colour which is a requirement. I will update the docs. Does that resolve it for you?

Zach-Johnson commented 6 years ago

No, if I have it enabled I get the lighter background on my active split and the dark background on the inactive split rather than the other way around. Hmm

Zach-Johnson commented 6 years ago

Okay, so in plugin/falcon.vim if I swap the colors on active and inactive it works perfectly:

" NeoVim has support for changing background colour depending on active or not
if exists('+winhighlight')
  " hi ActiveWindow guibg=NONE | hi InactiveWindow guibg=#141420
  hi ActiveWindow guibg=#141420 | hi InactiveWindow guibg=NONE 
  set winhighlight=Normal:ActiveWindow,NormalNC:InactiveWindow
endif
fenetikm commented 6 years ago

Ok, let's double check some things:

fenetikm commented 6 years ago

that... makes no sense!

Zach-Johnson commented 6 years ago

Okay, THAT'S what it is. My iTerm2 background is a slightly lighter shade and it's lighter than 141420, so the inactive window is actually getting a darker color than the active one, which in my case is using the lighter background color that I have iTerm2 set to

fenetikm commented 6 years ago

bingo, phew. Did you load the included iterm2 colours (come with Falcon)?

Zach-Johnson commented 6 years ago

I just took a look at them, I prefer the color set up I currently have for iTerm, but I'm just going to darken up my background so it plays a little nicer. Thanks!

fenetikm commented 6 years ago

Hah, no problem ;) Glad we worked it out.