mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 14:56:08 +00:00
perf(column): only build fold/sign column when present in 'statuscolumn'
Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered.
This commit is contained in:
17
src/nvim/fold_defs.h
Normal file
17
src/nvim/fold_defs.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef NVIM_FOLD_DEFS_H
|
||||
#define NVIM_FOLD_DEFS_H
|
||||
|
||||
#include "nvim/pos.h"
|
||||
|
||||
// Info used to pass info about a fold from the fold-detection code to the
|
||||
// code that displays the foldcolumn.
|
||||
typedef struct foldinfo {
|
||||
linenr_T fi_lnum; // line number where fold starts
|
||||
int fi_level; // level of the fold; when this is zero the
|
||||
// other fields are invalid
|
||||
int fi_low_level; // lowest fold level that starts in the same
|
||||
// line
|
||||
linenr_T fi_lines;
|
||||
} foldinfo_T;
|
||||
|
||||
#endif // NVIM_FOLD_DEFS_H
|
Reference in New Issue
Block a user