docs: add 'statuscolumn' docstrings (#21717)

This commit is contained in:
luukvbaal 2023-01-10 02:00:21 +01:00 committed by GitHub
parent dc7edce650
commit f62da7381e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -398,6 +398,10 @@ static int get_sign_attrs(buf_T *buf, linenr_T lnum, SignTextAttrs *sattrs, int
return num_signs;
}
/// Prepare and build the 'statuscolumn' string for line "lnum" in window "wp".
/// Fill "stcp" with the built status column string and attributes.
///
/// @param[out] stcp Status column attributes
static void get_statuscol_str(win_T *wp, linenr_T lnum, int row, int startrow, int filler_lines,
int cul_attr, int sign_num_attr, SignTextAttrs *sattrs,
foldinfo_T foldinfo, char_u *extra, statuscol_T *stcp)
@ -457,6 +461,11 @@ static void get_statuscol_str(win_T *wp, linenr_T lnum, int row, int startrow, i
}
}
/// Get information needed to display the next segment in the 'statuscolumn'.
/// If not yet at the end, prepare for next segment and decrement "draw_state".
///
/// @param stcp Status column attributes
/// @param[out] draw_state Current draw state in win_line()
static void get_statuscol_display_info(LineDrawState *draw_state, int *char_attr, int *n_extrap,
int *c_extrap, int *c_finalp, char_u *extra, char **pp_extra,
statuscol_T *stcp)

View File

@ -868,6 +868,12 @@ void draw_tabline(void)
redraw_tabline = false;
}
/// Build the 'statuscolumn' string for line "lnum". If "setnum" is true,
/// update the "lnum" and "relnum" vim-variables for a new line.
///
/// @param hlrec HL attributes (can be NULL)
/// @param stcp Status column attributes (can be NULL)
/// @return The width of the built status column string for line "lnum"
int build_statuscol_str(win_T *wp, bool setnum, bool wrap, linenr_T lnum, long relnum, int maxwidth,
int fillchar, char *buf, stl_hlrec_t **hlrec, statuscol_T *stcp)
{