-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
airline_b & airline_c sections are missing if I set their bg and fg color of COMMANDLINE mode as the same as airline_a's #2298
Comments
this is tricky. not sure what the best way around this is. Can you provide your theme please? |
this is my theme for now: lessnoise.vim, actually it was quoted above. Although I can get around this problem by changing the theme, I still feel that this problem should be solved by vim-airline self. |
Perhaps. I think the implicitly, vim-airline assumes, that different highlighting groups need to be - well - different, that means use different color attributes. And this is where you run into problems. Perhaps it is possible to use attributes like |
Agree, but, the statusline's vim-airline/autoload/airline.vim Line 181 in 06117a6
For my theme, in the command line mode, This problem may can be solved by keeping the |
In my case, this problem solved by reloading colorscheme at end of airline#mode_changed. |
environment
NVIM v0.4.4
latest
Gentoo
YES
konsole
xterm-256color
t_Co=256
YES
actual behavior
Usually, the statusline looks like this:
However, after I opened a new buffer or window in current tab, the stausline changed to
It's very strange, the
a
,b
andc
sections got the same colors and font style although it has returned to the NORMAL mode.what did I do
I create a new theme lessnoise.vim. I want to use the same fg and bg color for airline_a, b and c when in COMMANDLINE mode, and these are defined at line 116 of my theme file.
At first, I couldn't determine whether it was the vim-airline problem or the vim/neovim problem, so I went to check the vim-airline and vim codes. After doing a lot of testing, I found it's a vim-airline problem:
Vim-airline changes group to a different one according to the different colors instead of the exactly group name since be6e4d6 and 09817e0 due to the issue #599. So, using command line to open a new buffer makes the statusline has only one
airline_a
left section if I configured same colors forairline_a
,airline_b
andairline_c
.I tried to solve this problem by myself but failed. If I add a new condition to judge if the
airline_b
group contained like this commit bekcpear@9709eb0, the left sections will be okay, but the right sections broken still because of same colors defined in the NORMAL mode, like this:the airline_z group broken.
Of cause, I can add another condition to judge the sections on the right, but I think it's dirty. And I also think using configured colors to change group is not very good.
I also tried to refactor the other functions related to
should_change_group()
, but.. it's too large.., and if thealt_sep
symbol should be displayed when continued groups have same colors andsep
symbol should be displayed when they have different colors, the statusline'scontext.line
should be rebuild every time it triggered. I don't know if this will affect performance and is there any other better solution.Currently, I will try to change my theme to judge the runtime environment(GUI or TUI), and change the unused colors to get around this problem.
The text was updated successfully, but these errors were encountered: