Commit Graph

40 Commits

Author SHA1 Message Date
thawk 45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt 73aea86a7a Do not unconditionally modify airline_c_inactive
consider a window with these splits:
,----
| file1
| ---
| file2
| ---
| file1
`----

If the top buffer is the active one and you start modifying this buffer,
this will also reset the highlighting for the inactive buffer2, since
the highlighting group 'airline_c_inactive' is used for both windows
(one having the unmodified buffer 'file2' and one having the modified
'file1').

This lead to the incorrect highlighting of the buffer name of file2.

Airline basically already created different airline_c<bufnr>_inactive
highlighting groups, but unfortunately did not use them.

Therefore, make the builder aware of this and always append the buffer
number to the group 'airline_c' if it is in an inactive window.

2) we need to make sure, the highlighting won't get overwritten, so
make the highlighter aware of this situation as well, by appending the
buffer number to the group name, if it creates the 'inactive' mode
groups and a buffer number has been given.

this fixes #1233
2016-09-08 18:46:11 +02:00
Ythildyr afb75adc11 `:AirlineRefresh` not work correctly
If active buffer is modified, `:AirlineRefresh` apply `normal` highlight
instead of `normal_modified` highlight.

No particular config is requiered to reproduce this bug.

I see this bug with option `g:airline_skip_empty_sections` set.
Add any modification at the active buffer return to normal mode,
**do not save** and wait a few seconds, you can see highlight change to
normal but file is modified.

Without option `g:airline_skip_empty_sections`, add any modification at
the active buffer return to normal mode and type `:AirlineRefresh` you
can see change to bad highlight .
2016-08-28 14:41:45 +02:00
Daniel Hahler f51f73773d airline#highlighter#exec: do not build cmd always 2016-06-06 20:41:33 +02:00
Daniel Hahler 429cfcd71e minor: do not copy args in s:get_array 2016-06-06 20:40:51 +02:00
Daniel Hahler d39076a07d airline#highlighter: s:get_syn: fallback to 'NONE'
This is required when used with 'Normal' with a transparent background.
Falling back to 1 here results in "red" for "ctermbg"!

I think it's important to keep the 'NONE' color property here, instead
of hardcoding the fallbacks (even if white would be used instead of
red).
2016-02-16 00:44:07 +01:00
Christian Brabandt af3f209d7a Try to avoid excessive redraws.
Most of them seem to be caused by using :hi statements, although the
highlighting group to be created is exactly the same. Therefore, get the
info from actual definition and only execute :hi when the new group is
actually different.

Also try to avoid to generate :hi statements when the popupmen is
visible. This causes flickers.
2016-02-06 13:55:28 +01:00
Christian Brabandt 87d60febaf fix neovim color mode 2016-02-05 22:47:57 +01:00
Andrea Schiavini ef3746d022 Neovim support 2016-02-05 09:19:31 +01:00
Christian Brabandt 768a475add Better algorightm, to get msdos colors
currently, full 255 colors were returned, while in fact
msdos console only supports 16 colors. So fix this.
2016-01-27 20:37:58 +01:00
Christian Brabandt 5181d49a63 cmd.exe: Check for NONE/fg/bg of color value
Color values can have NONE/fg/bg values as well, and this would
error out.
2016-01-27 19:12:54 +01:00
Christian Brabandt 349ca86c71 Correct the comparison for given color codes
this issue fixes #758

The problem was, that a given color list ['','',0,'',''] was given to
the airline#highlighter#exec() function. This resulted in the following
comparison:

if (get(colors,2,'') != '')  ? 'ctermfg='.colors[2] : ''

which, since echo 0 != '' returns falls will return a single:

:hi group

and no color codes given and therefore, Vim would output the
current highlighting group.

Use isnot# as comparison to fix this issue.
2016-01-25 12:21:34 +01:00
Bailey Ling 048b24a916 happy 2016! 2016-01-14 21:38:38 -05:00
Eduardo Antunes C. de Sousa 7ea4b510af Dectect when vim.exe is running on ConEmu with 256 colors configured, so
it will use full color scheme.

More information on http://stackoverflow.com/questions/14315519/conemu-vim-syntax-highlight
2015-03-06 11:42:04 -03:00
Claudia Hardman ac58bc9954 Add support for 24-bit colors with +termtruecolor flag 2015-02-16 12:00:52 -05:00
Bailey Ling 1ca6ffb6d0 happy 2015
resolves #692.
2015-02-13 21:47:43 -05:00
Bailey Ling 09817e0984 fix regression with serene theme, #599 2014-11-15 19:49:02 +00:00
Bailey Ling be6e4d6dd6 check background of groups to determine transition. resolves #599. 2014-11-09 00:52:42 -05:00
Suraj N. Kurapati bd7220cb5b cterm=reverse not honored; only term=reverse was
This patch makes Airline honor the `cterm=reverse` syntax attribute.
2014-06-29 06:33:42 -07:00
Bailey Ling baed8ac063 happy 2014 2014-01-19 23:44:44 -05:00
Bailey Ling 99b7cdf334 improve performance with accent cache (#326). 2013-11-01 00:58:08 -04:00
Bailey Ling 2f3b33daae fix solarized theme being out of sync (#288). 2013-09-27 21:36:44 -04:00
Bailey Ling 7d78fbf2cc give the line number a bold accent by default. 2013-09-20 00:01:02 -04:00
Bailey Ling 6442f01912 populate all modes with accent colors. 2013-09-17 22:45:12 -04:00
Bailey Ling 8cfb43fe32 refresh inactive modified colors on theme switch. resolves #233. 2013-09-07 13:03:15 +00:00
Bailey Ling d74b3bfdbf fix inactive modified arrow colors (#233). 2013-09-07 13:00:10 +00:00
Bailey Ling f6900aeb0a move highlighter code to correct place and test. 2013-09-02 02:57:32 +00:00
Bailey Ling 0e6035f75c convert the highlighter into a singleton. 2013-08-24 09:40:20 -04:00
Bailey Ling 30c3613924 improve algorithm for inactive colors. resolves #178. 2013-08-24 02:52:56 +00:00
mattn a91b442366 Strictly color value conversion 2013-08-21 10:27:00 +09:00
Bailey Ling 8bc08979d7 inverse doesn't work in all environments, do it manually. 2013-08-20 23:09:40 +00:00
Bailey Ling f780621aa0 support x,y,z theming. resolves #159. 2013-08-20 01:56:13 +00:00
Bailey Ling dd5dbdd242 undo use of inverse; caused problems with empty sections. 2013-08-19 19:07:31 +00:00
Bailey Ling 38b8520a37 fix arrows being out of sync. 2013-08-18 05:34:26 +00:00
Bailey Ling 45f0d896e9 move all theme variables into a single dictionary 2013-08-18 00:59:49 +00:00
Bailey Ling f49038fba6 clean up builder a bit, use inverse 2013-08-17 23:31:51 +00:00
Bailey Ling b19a29675d fix list being unbounded 2013-08-17 17:10:06 -04:00
Bailey Ling 3fbdd28e5d add profiler. optimize separator highlighting. 2013-08-17 17:35:06 +00:00
Bailey Ling 47bfeee3ae fix separator colors for inactive splits 2013-08-17 15:12:01 +00:00
Bailey Ling 2f92346194 add highlighter class 2013-08-17 12:52:25 +00:00