aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/grid_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/grid_defs.h')
-rw-r--r--src/nvim/grid_defs.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/nvim/grid_defs.h b/src/nvim/grid_defs.h
index bf0a5d63a8..1571340849 100644
--- a/src/nvim/grid_defs.h
+++ b/src/nvim/grid_defs.h
@@ -10,7 +10,7 @@
#define MAX_MCO 6 // fixed value for 'maxcombine'
// The characters and attributes drawn on grids.
-typedef char_u schar_T[(MAX_MCO+1) * 4 + 1];
+typedef char_u schar_T[(MAX_MCO + 1) * 4 + 1];
typedef int sattr_T;
enum {
@@ -21,7 +21,6 @@ enum {
kZIndexCmdlinePopupMenu = 250,
};
-
/// ScreenGrid represents a resizable rectuangular grid displayed by UI clients.
///
/// chars[] contains the UTF-8 text that is currently displayed on the grid.
@@ -50,7 +49,7 @@ struct ScreenGrid {
schar_T *chars;
sattr_T *attrs;
- unsigned *line_offset;
+ size_t *line_offset;
char_u *line_wraps;
// last column that was drawn (not cleared with the default background).
@@ -58,8 +57,8 @@ struct ScreenGrid {
int *dirty_col;
// the size of the allocated grid.
- int Rows;
- int Columns;
+ int rows;
+ int cols;
// The state of the grid is valid. Otherwise it needs to be redrawn.
bool valid;
@@ -111,4 +110,22 @@ struct ScreenGrid {
false, 0, 0, NULL, false, true, 0, \
0, 0, 0, 0, 0, false }
+/// 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.
+ kStlClickFuncRun, ///< Run user function.
+ } type; ///< Type of the click.
+ int tabnr; ///< Tab page number.
+ char *func; ///< Function to run.
+} StlClickDefinition;
+
+/// Used for tabline clicks
+typedef struct {
+ StlClickDefinition def; ///< Click definition.
+ const char *start; ///< Location where region starts.
+} StlClickRecord;
+
#endif // NVIM_GRID_DEFS_H