aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-01 22:31:02 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-01 22:31:02 -0500
commit5308585adf8140e232602c96e22909371736d826 (patch)
treee865399183e7b1af7630172efcffc5d5f2ef7bc6 /runtime
parent830678d5f98a061ef8da4947d0019e5acdec690f (diff)
parentad5cb87d7af772711579ad825e32a7cbddcd5170 (diff)
downloadrneovim-5308585adf8140e232602c96e22909371736d826.tar.gz
rneovim-5308585adf8140e232602c96e22909371736d826.tar.bz2
rneovim-5308585adf8140e232602c96e22909371736d826.zip
Merge pull request #3871 from ZyX-I/tabline-clicks
Allow running random code on tabline clicks
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt1
-rw-r--r--runtime/doc/options.txt38
-rw-r--r--runtime/doc/various.txt1
3 files changed, 35 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 766dafd1d7..e4311b3ba0 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -7063,6 +7063,7 @@ statusline Compiled with support for 'statusline', 'rulerformat'
syntax Compiled with syntax highlighting support |syntax|.
syntax_items There are active syntax highlighting items for the
current buffer.
+tablineat 'tabline' option accepts %@Func@ items.
tag_binary Compiled with binary searching in tags files
|tag-binary-search|.
tag_old_static Compiled with support for old static tags
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d9024b98c0..51bfc12f9d 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -6011,11 +6011,39 @@ A jump table for the options with a short description can be found at |Q_op|.
( - Start of item group. Can be used for setting the width and
alignment of a section. Must be followed by %) somewhere.
) - End of item group. No width fields allowed.
- T N For 'tabline': start of tab page N label. Use %T after the last
- label. This information is used for mouse clicks.
- X N For 'tabline': start of close tab N label. Use %X after the
- label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
- mark. This information is used for mouse clicks.
+ T N For 'tabline': start of tab page N label. Use %T or %X to end
+ the label. Clicking this label with left mouse button switches
+ to the specified tab page.
+ X N For 'tabline': start of close tab N label. Use %X or %T to end
+ the label, e.g.: %3Xclose%X. Use %999X for a "close current
+ tab" label. Clicking this label with left mouse button closes
+ specified tab page.
+ @ N For 'tabline': start of execute function label. Use %X or %T to
+ end the label, e.g.: %10@SwitchBuffer@foo.c%X. Clicking this
+ label runs specified function: in the example when clicking once
+ using left mouse button on "foo.c" "SwitchBuffer(10, 1, 'l',
+ ' ')" expression will be run. Function receives the
+ following arguments in order:
+ 1. minwid field value or zero if no N was specified
+ 2. number of mouse clicks to detect multiple clicks
+ 3. mouse button used: "l", "r" or "m" for left, right or middle
+ button respectively; one should not rely on third argument
+ being only "l", "r" or "m": any other non-empty string value
+ that contains only ASCII lower case letters may be expected
+ for other mouse buttons
+ 4. modifiers pressed: string which contains "s" if shift
+ modifier was pressed, "c" for control, "a" for alt and "m"
+ for meta; currently if modifier is not pressed string
+ contains space instead, but one should not rely on presence
+ of spaces or specific order of modifiers: use |stridx()| to
+ test whether some modifier is present; string is guaranteed
+ to contain only ASCII letters and spaces, one letter per
+ modifier; "?" modifier may also be present, but its presence
+ is a bug that denotes that new mouse button recognition was
+ added without modifying code that reacts on mouse clicks on
+ this label.
+ Note: to test whether your version of Neovim contains this
+ feature use `has('tablineat')`.
< - Where to truncate line if too long. Default is at the start.
No width fields allowed.
= - Separation point between left and right aligned items.
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 26ff8f0783..ff37466a14 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -363,6 +363,7 @@ N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring'
N *+syntax* Syntax highlighting |syntax|
+N *+tablineat* 'tabline' option recognizing %@Func@ items.
N *+tag_binary* binary searching in tags file |tag-binary-search|
N *+tag_old_static* old method for static tags |tag-old-static|
m *+tag_any_white* any white space allowed in tags file |tag-any-white|