tabline: Add %[] atom to the tabline, for random commands on click

Currently untested and undocumented.
This commit is contained in:
ZyX
2015-11-23 03:07:32 +03:00
parent 3e3d2d783c
commit ef662498b1
8 changed files with 202 additions and 87 deletions

View File

@@ -16,6 +16,29 @@
#define NOT_VALID 40 /* buffer needs complete redraw */
#define CLEAR 50 /* screen messed up, clear it */
/// Status line click definition
typedef struct {
enum {
kStlClickDisabled = 0, ///< Clicks to this area are ignored.
kStlClickTabSwitch, ///< Switch to the given tab.
kStlClickTabClose, ///< Close given tab.
kStlClickCmd, ///< Run VimL command.
} type; ///< Type of the click.
int tabnr; ///< Tab page number.
char *cmd; ///< Command to execute.
} StlClickDefinition;
/// Used for tabline clicks
typedef struct {
StlClickDefinition def; ///< Click definition.
const char *start; ///< Location where region starts.
} StlClickRecord;
/// Array defining what should be done when tabline is clicked
extern StlClickDefinition *tab_page_click_defs;
/// Size of the tab_page_click_defs array
extern long tab_page_click_defs_size;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "screen.h.generated.h"