Commit Graph

176 Commits

Author SHA1 Message Date
Christian Brabandt
5aef1b90e5
tabline: Correctly trigger on BufDelete autocommand
fixes #399
2018-07-13 22:29:34 +02:00
Christian Brabandt
821372b9cf
tabline: re-map tabline keys
fixes #1753
2018-07-13 21:33:03 +02:00
Liam Fleming
feca81fb86 add "!" to function signatures 2018-06-13 17:52:13 +01:00
Hana Shiro
acb93da0d8 Fix tabline didn't update when enable both buffers and tabs 2018-06-05 06:11:14 +08:00
Christian Brabandt
add75907d5
Merge pull request #1738 from shirohana/fix/ctrlspace-tabline-switching
airline#extensions#ctrlspace: Fix tabline didn't update when switch to tab which focused on non-listed buffer
2018-06-04 22:56:22 +02:00
Christian Brabandt
1bb1ce594a
Formatter: Use pathshorten() instead of substitute()
The default formatter uses a hand-build regexp for shortening the path
in the tabline. However, since it uses the \w  regex atom, this won't
match e.g. cyrillic letters.

To fix this, use the builtin pathshorten() function which does handle
this case correctly. For a test, use e.g. 'D/Учёба/t.c'

closes #1737
2018-06-04 21:59:16 +02:00
Hana Shiro
c7d4710f76 Refactor airline#extentions#tabline#ctrlspace#* 2018-06-02 23:41:15 +08:00
Hana Shiro
6e1e6686e7 Fix problems caused by #1524 2018-06-02 21:22:00 +08:00
Hana Shiro
a6e07b6a55 Remove unused catch block 2018-06-02 14:04:25 +08:00
Hana Shiro
4db6d11962 Fix indentation 2018-06-02 13:59:08 +08:00
Hana Shiro
ac799f6021 Rename parameters for better readability 2018-06-02 13:49:32 +08:00
Hana Shiro
92bf1b0b39 Use ternary-operator 2018-06-02 13:02:49 +08:00
Christian Brabandt
a76f523be5
bufferline: always add a space for the very first item
closes #1631
2018-04-15 10:16:28 +02:00
mg979
f7c818a0ff
add xtabline extension 2018-04-14 14:03:21 +02:00
Christian Brabandt
47bdae9067
Merge pull request #1702 from mrmr1993/fix-buffer-counts
Fix buffer numbering to start from 1 with buffer_idx_mode
2018-04-03 03:16:38 +02:00
Gianni Chiappetta
023fe122c5
Support typescript in jsformatter 2018-04-02 11:29:18 -04:00
mrmr1993
fbf96559c9 Fix buffer numbering to start from 1 with buffer_idx_mode
275ec4fe63 broke this so that numbering
started from 0 instead of 1 with
g:airline#extensions#tabline#buffer_idx_mode = 1

Specifically, I overlooked that |index| actually tracked the index of
the current buffer in the buffer list *starting from 1*, whereas I
assumed it tracked the true index (starting from 0).
2018-04-02 01:04:43 +01:00
Christian Brabandt
f0b969549a
Merge pull request #1693 from mrmr1993/current-tabs-visible-experiments
Rework tabline for tabs and buffers
2018-04-01 14:01:17 +02:00
mrmr1993
47c36d2819 Don't let the current buffer be -1 when calculating the tabline 2018-04-01 01:17:18 +01:00
mrmr1993
aee733aa87 Don't show titles in the tabline if there aren't any
airline#extensions#tabline#buflist#list doesn't pick up some buffers
(most notably Netrw buffers), so there are sometimes no buffers to show
and the tabline code fails with an error. This avoids that situation.

It would be better to detect these and show titles for them, but for now
this restores the old behaviour.
2018-04-01 01:05:51 +01:00
mrmr1993
c75106f12d Don't change remaining_space in tabline builder until necessary 2018-03-22 16:42:06 +00:00
mrmr1993
4b1913ad13 Use insert_section for overflow markers in tabline builder 2018-03-22 16:42:06 +00:00
mrmr1993
df2f380c9e Add get_separator_change_with_end to tabline builder 2018-03-22 16:14:18 +00:00
mrmr1993
2528de7d81 Add comments to tabline/builder 2018-03-19 16:21:43 +00:00
mrmr1993
7396dc7a10 Create helper function tabline_evaluated_length 2018-03-19 15:05:50 +00:00
mrmr1993
51bb8dd7e0 Move strchars into util.vim 2018-03-19 15:03:51 +00:00
mrmr1993
5b7b9cf656 Rename remaining tab -> title in tabline/builder 2018-03-19 15:03:51 +00:00
mrmr1993
0b47adf087 Rename tab -> title in tabline/builder method names 2018-03-19 14:36:02 +00:00
mrmr1993
3914d5b475 Rename skipped_tabs_marker to overflow_marker 2018-03-19 14:36:02 +00:00
Christian Brabandt
ecff00a559
tabline: do not show buffer label if show_buffers is zero
fixes #1689
2018-03-19 15:06:55 +01:00
mrmr1993
75f53ef6e5 Rename last_{left,right}_group to {left,right}_group 2018-03-18 01:15:11 +00:00
mrmr1993
a2e0ed982f Rename left{,_alt}_sep_size to {,alt_}sep_size 2018-03-18 01:13:30 +00:00
mrmr1993
84bf60c405 Statusline: Use separator widths to calculate whether a title will fit 2018-03-18 00:52:34 +00:00
mrmr1993
896c14bded Reset _remaining_space if a title can't be inserted
This gives us a chance to add the title on the other side if it will
fit, so that we fill more space in the tabline.
2018-03-17 20:05:38 +00:00
Christian Brabandt
fb85c0a91a
Merge pull request #1678 from mg979/buflist
Changed buflist.vim algorithm
2018-03-15 21:52:35 +01:00
mrmr1993
d13305fc5d Redraw buffer tabline when the terminal width changes 2018-03-15 20:44:51 +00:00
mrmr1993
7844d8bf72 Remove get_visible_buffers 2018-03-15 20:44:51 +00:00
mrmr1993
4a342afb90 Add an option to centre the active tab in the tabline 2018-03-15 20:44:51 +00:00
mrmr1993
275ec4fe63 Use tabline builder for buffers tabline 2018-03-15 20:44:51 +00:00
mrmr1993
d9e68039b8 Take the first tab number in tabline/builder.insert_tabs 2018-03-15 20:44:51 +00:00
mrmr1993
3cd8daa162 Add support for get_pretitle and get_posttitle to tabline builder 2018-03-15 20:44:51 +00:00
mrmr1993
e6b6f36d90 Remove %@...@ patterns in evaluate_tabline if has('tablineat') 2018-03-15 19:21:15 +00:00
mrmr1993
a7bff3b30b Pass number of tabs as an argument to insert_tabs 2018-03-15 18:21:29 +00:00
mrmr1993
5ecc25d6d6 Move tab_nr_type into tabs get_title 2018-03-15 18:14:50 +00:00
mrmr1993
6db0af6f8d Factor out tab insertion into its own function 2018-03-15 18:14:24 +00:00
mrmr1993
9b41fe5de9 Replace tabs tabline remaining_space with a member variable 2018-03-15 18:01:39 +00:00
mrmr1993
1328610188 Initialise tabs tabline builder variables in insert_tabs 2018-03-15 17:46:33 +00:00
mrmr1993
ada8cd7641 Use variables in the tabs tabline builder to track position 2018-03-15 17:41:08 +00:00
mrmr1993
349d01ba39 Generate tabs directly in tabline/builder.build 2018-03-15 17:38:19 +00:00
mrmr1993
3f87d28abb Move insert_tabs into tabs tabline builder prototype
Also move evaluate_tabline and strchars methods that it uses
2018-03-15 17:05:58 +00:00