feat: click support for 'statusline', 'winbar' #18650

The mouseclick item "%@" is now supported by 'statusline' and 'winbar'.
Previously it was only supported by 'tabline'.
This commit is contained in:
Famiu Haque
2022-05-23 19:11:24 +06:00
committed by GitHub
parent 9e1ee9fb1d
commit 4c6626f03d
10 changed files with 529 additions and 386 deletions

View File

@@ -111,4 +111,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