HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //home/ubuntu/neovim/src/nvim/statusline_defs.h
#pragma once

#include <stdbool.h>

#include "nvim/fold_defs.h"
#include "nvim/sign_defs.h"

/// 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;

/// Used for highlighting in the status line.
typedef struct stl_hlrec stl_hlrec_t;
struct stl_hlrec {
  char *start;
  int userhl;                   // 0: no HL, 1-9: User HL, < 0 for syn ID
};

/// Used for building the status line.
typedef struct stl_item stl_item_t;
struct stl_item {
  // Where the item starts in the status line output buffer
  char *start;
  // Function to run for ClickFunc items.
  char *cmd;
  // The minimum width of the item
  int minwid;
  // The maximum width of the item
  int maxwid;
  enum {
    Normal,
    Empty,
    Group,
    Separate,
    Highlight,
    TabPage,
    ClickFunc,
    Trunc,
  } type;
};

/// Struct to hold info for 'statuscolumn'
typedef struct {
  int width;                           ///< width of the status column
  int num_attr;                        ///< default highlight attr
  int sign_cul_id;                     ///< cursorline sign highlight id
  bool draw;                           ///< whether to draw the statuscolumn
  bool use_cul;                        ///< whether to use cursorline attrs
  stl_hlrec_t *hlrec;                  ///< highlight groups
  foldinfo_T foldinfo;                 ///< fold information
  SignTextAttrs *sattrs;               ///< sign attributes
} statuscol_T;