diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 9 | ||||
-rw-r--r-- | src/nvim/statusline.c | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index d3e8545b88..8f04c35bda 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -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) diff --git a/src/nvim/statusline.c b/src/nvim/statusline.c index d548c285fb..7d8394e1b4 100644 --- a/src/nvim/statusline.c +++ b/src/nvim/statusline.c @@ -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) { |