junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.49k stars 115 forks source link

Colors break when exiting - Peaksea #146

Closed Donkeyfish87 closed 7 years ago

Donkeyfish87 commented 7 years ago

I use the Peaksea color scheme. When I enter distraction free mode it works like it should, but the colors are reversed (light-grey background) when I exit. The only way (I have discovered) to revert is to restart vim.

I tried with a different colorscheme, solarized, which didn't have this issue.

ultimatecoder commented 7 years ago

@Donkeyfish87 I tried after installing peaksea colorscheme. I am able to reproduce this bug.

ultimatecoder commented 7 years ago

Reference to Peaksea colorscheme: http://www.vim.org/scripts/script.php?script_id=760

ffesseler commented 7 years ago

Same issue with Tomorrow-Night colorscheme

junegunn commented 7 years ago

It's a bug of the color scheme. You can reproduce the problem without Goyo just by reloading the color scheme: repeat :colo peaksea. And you're running into this since Goyo reloads the current color scheme on exit to restore the colors. A workaround for this particular color scheme would be to set up GoyoLeave autocmd as follows.

autocmd! User GoyoLeave nested set bg=dark | colo peaksea