-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[WIP] Various improvements to folding #6073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fe08c50
d862eea
4b485ec
6d6c6a9
ebd96df
64ed994
3474410
9e47029
71f3d8b
da5ea0f
58f04bb
c7f524a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1062,13 +1062,12 @@ struct window_S { | |
int w_lines_valid; /* number of valid entries */ | ||
wline_T *w_lines; | ||
|
||
garray_T w_folds; /* array of nested folds */ | ||
bool w_fold_manual; /* when true: some folds are opened/closed | ||
manually */ | ||
bool w_foldinvalid; /* when true: folding needs to be | ||
recomputed */ | ||
int w_nrwidth; /* width of 'number' and 'relativenumber' | ||
column being used */ | ||
garray_T w_folds; //!< array of nested folds | ||
bool w_fold_manual; //!< when true: some folds are open/closed manually | ||
bool w_foldinvalid; //!< when true: folding needs to be recomputed | ||
int w_fdcwidth; //!< optimal width to draw 'foldcolumn' | ||
int w_nrwidth; //!< width of 'number' and 'relativenumber' | ||
//!< column being used | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think doxygen expects three slashes, no? Otherwise the |
||
|
||
/* | ||
* === end of cached values === | ||
|
@@ -1166,9 +1165,7 @@ struct window_S { | |
int w_fraction; | ||
int w_prev_fraction_row; | ||
|
||
linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width | ||
* was computed. */ | ||
int w_nrwidth_width; /* nr of chars to print line count. */ | ||
int w_nrwidth_width; //!< nr of chars to print line count. */ | ||
|
||
qf_info_T *w_llist; /* Location list for this window */ | ||
/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8861,7 +8861,10 @@ static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr) | |
} | ||
fold_count = foldedCount(curwin, lnum, &foldinfo); | ||
if (fold_count > 0) { | ||
text = get_foldtext(curwin, lnum, lnum + fold_count - 1, &foldinfo, buf); | ||
text = get_foldtext(curwin, lnum, lnum + fold_count - 1, | ||
foldinfo.fi_level, buf); | ||
text = get_foldtext(curwin, lnum, lnum + fold_count - 1, | ||
foldinfo.fi_level, buf); | ||
if (text == buf) { | ||
text = vim_strsave(text); | ||
} | ||
|
@@ -10609,6 +10612,7 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr) | |
"find_in_path", | ||
"float", | ||
"folding", | ||
"folding_fillchars", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need these feature names since users can check |
||
#if defined(UNIX) | ||
"fork", | ||
#endif | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be in
api/window.c
?see
:help dev-api
for API naming conventions:nvim_win_add_fold()
,nvim_win_del_fold()
.