Commit Graph

51 Commits

Author SHA1 Message Date
Christian Brabandt
f5359f9177 do not skip empty sections for the tabline
commit #3d667c32d3ac04 fixed a bug, that a section was not considered
empty for the statusline, also g:airline_skip_empty was set.

However unfortunately, this lead to a regression, makeing the tabline
ugly, because sections, that contained a single highlighting group would
be considered empty and would therefore be skipped. Since this is not
what is expected, make s:section_is_empty() return zero, when it notices
we are looking at a tabline.

fixes #1273
2016-09-27 21:44:00 +02:00
Christian Brabandt
1c052e39b1 Merge pull request #1271 from chrisbra/highlighter_bug
Use the correct highlighting for the inactive window
2016-09-26 21:13:02 +02:00
Christian Brabandt
29c556dba4 use correct groupname for inactive windows
airline_c (which contains the filename) usually is used together with
the buffer number, so that several windows showing the a different
buffer do not share the same highlighting group.

This was fixed in 73aea86a, but unfortunately it was forgotten to not
only add this to the current group, but also modify the previous group
accordingly. This is what this patch does.

fixes #1268
2016-09-26 21:12:15 +02:00
Christian Brabandt
3d667c32d3 for empty sections, make test return true
fixes #1231
2016-09-24 22:06:41 +02:00
thawk
45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt
65b9aa4856 Check for existence of key in context dict before using it
fixes #1251
2016-09-09 08:07:07 +02: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
Christian Brabandt
4ca34804b2 Merge pull request #1161 from chrisbra/1157
fix adding space padding to section caused by PR1157
2016-05-12 21:42:37 +02:00
Christian Brabandt
727208d766 Do not draw separators for empty sections
This is a little bit a hack, because by the time the separators are
added, it is not clear, if the following section is empty, therefore
we need to parse the content of the following section and eval the
expressions to find out, if this is empty

Remarks:
- catch all exceptions when eval'ing statusline

- make sure, that the seperators are highlighted
  even when skipping empty regions (highlight group
  names need to be adjusted)

- if a section is defined as empty, it will be removed completly from
  the statusline. This means, it won't be called on the next update
  and may not refresh properly (e.g. when the whitespace check
  triggers, therefore, the whitesapce extension has to call an
  explicit redraw whenever it is supposed to be refreshed)
2016-05-12 21:40:56 +02:00
Christian Brabandt
a4840f1585 fix adding space padding to section caused by PR1157
fixes #1158
2016-05-12 21:35:28 +02:00
Cenk Alti
2d7f5b2cc1 do not add padding to section name if empty 2016-05-08 04:52:35 +03: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
Bailey Ling
048b24a916 happy 2016! 2016-01-14 21:38:38 -05: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
6b4f03efbc fix seperator drawing when tabs are shown. fixes #653. 2014-11-25 21:04:18 -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
Bailey Ling
727192ad6a refactor builder and reduce state across multiple calls 2014-11-04 14:49:02 -05:00
Bailey Ling
baed8ac063 happy 2014 2014-01-19 23:44:44 -05:00
Bailey Ling
6c66ad5dfc refactor ctrlp statusline to use builder. resolves #291. 2013-10-01 21:23:17 -04:00
Bailey Ling
2f3b33daae fix solarized theme being out of sync (#288). 2013-09-27 21:36:44 -04:00
Bailey Ling
b5e8ea275e do not render accents in inactive splits. resolves #270. 2013-09-22 17:15:02 -04:00
Bailey Ling
474116461f use __accent to better differentiate between a real group. 2013-09-22 15:20:06 -04:00
Bailey Ling
9d5a1744a1 support multiple accents in the same section (#203). 2013-09-18 21:31:39 -04:00
Bailey Ling
6442f01912 populate all modes with accent colors. 2013-09-17 22:45:12 -04:00
Bailey Ling
02aa620a92 correctly inject the accent highlight groups. 2013-09-15 22:47:13 -04:00
Bailey Ling
ad3556d243 remove redundant highlight group. 2013-09-07 03:43:23 +00:00
Bailey Ling
53364af1e3 support configuring tabline separators independently. resolves #215. 2013-09-04 19:20:06 +00:00
Bailey Ling
301fcdc64a use statusline function for better control. 2013-09-02 18:55:15 +00:00
Bailey Ling
b9483d8c15 improve builder to support blended sections. 2013-08-25 11:39:42 -04:00
Bailey Ling
0e6035f75c convert the highlighter into a singleton. 2013-08-24 09:40:20 -04:00
Bailey Ling
04daa66b48 Revert "inactivate existing statusline without building a new one."
This reverts commit 53b856b0c5.
2013-08-24 01:08:22 -04:00
Bailey Ling
74849d4a10 improved unite integration (#165). 2013-08-24 04:08:57 +00:00
Bailey Ling
53b856b0c5 inactivate existing statusline without building a new one. 2013-08-24 03:54:55 +00:00
Bailey Ling
3bb451f1f4 pass context into the builder. 2013-08-24 03:18:43 +00:00
Bailey Ling
30c3613924 improve algorithm for inactive colors. resolves #178. 2013-08-24 02:52:56 +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
f49038fba6 clean up builder a bit, use inverse 2013-08-17 23:31:51 +00:00
Bailey Ling
f938159d0d fix inactive responding to modified, fix trimming 2013-08-17 22:03:50 +00:00
Bailey Ling
e7c5bbb671 remove auto prefix. optimize getwinvar 2013-08-17 17:39:36 -04:00
Bailey Ling
3814c21125 optimize newing up the builder 2013-08-17 16:44:53 -04: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
Bailey Ling
c017c9fbb3 miscellaneous minor changes 2013-08-16 14:57:48 +00:00
Bailey Ling
6e515a4627 remove redundancy from the map 2013-08-16 14:57:48 +00:00
Bailey Ling
af7dfc8677 update separator colors when mode changes 2013-08-16 14:57:47 +00:00
Bailey Ling
47c80c31da reload separator colors on demand 2013-08-16 14:57:47 +00:00