aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-11-19 20:21:53 +0100
committerGitHub <noreply@github.com>2021-11-19 14:21:53 -0500
commit725cbe7d414f609e769081276f2a034e32a4337b (patch)
treeda4a7175d450e582fab94480b59ea54454cb0078 /src/nvim/fold.c
parent9ec4417afc072533ed2c6924323e9d885c52f6fe (diff)
downloadrneovim-725cbe7d414f609e769081276f2a034e32a4337b.tar.gz
rneovim-725cbe7d414f609e769081276f2a034e32a4337b.tar.bz2
rneovim-725cbe7d414f609e769081276f2a034e32a4337b.zip
refactor: saner options for uncrustify (#16204)
* sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index daf0df9326..4a8be7a31b 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -202,7 +202,7 @@ bool hasFoldingWin(win_T *const win, const linenr_T lnum, linenr_T *const firstp
* Recursively search for a fold that contains "lnum".
*/
garray_T *gap = &win->w_folds;
- for (;; ) {
+ for (;;) {
if (!foldFind(gap, lnum_rel, &fp)) {
break;
}
@@ -455,7 +455,7 @@ void foldOpenCursor(void)
checkupdate(curwin);
if (hasAnyFolding(curwin)) {
- for (;; ) {
+ for (;;) {
done = DONE_NOTHING;
(void)setManualFold(curwin->w_cursor, true, false, &done);
if (!(done & DONE_ACTION)) {
@@ -716,7 +716,7 @@ void deleteFold(win_T *const wp, const linenr_T start, const linenr_T end, const
garray_T *found_ga = NULL;
linenr_T lnum_off = 0;
bool use_level = false;
- for (;; ) {
+ for (;;) {
if (!foldFind(gap, lnum - lnum_off, &fp)) {
break;
}
@@ -897,7 +897,7 @@ int foldMoveTo(const bool updown, const int dir, const long count)
linenr_T lnum_found = curwin->w_cursor.lnum;
int level = 0;
bool last = false;
- for (;; ) {
+ for (;;) {
if (!foldFind(gap, curwin->w_cursor.lnum - lnum_off, &fp)) {
if (!updown || gap->ga_len == 0) {
break;
@@ -1155,7 +1155,7 @@ static int foldLevelWin(win_T *wp, linenr_T lnum)
// Recursively search for a fold that contains "lnum".
gap = &wp->w_folds;
- for (;; ) {
+ for (;;) {
if (!foldFind(gap, lnum_rel, &fp)) {
break;
}
@@ -1265,7 +1265,7 @@ static linenr_T setManualFoldWin(win_T *wp, linenr_T lnum, int opening, int recu
* Find the fold, open or close it.
*/
gap = &wp->w_folds;
- for (;; ) {
+ for (;;) {
if (!foldFind(gap, lnum, &fp)) {
// If there is a following fold, continue there next time.
if (fp != NULL && fp < (fold_T *)gap->ga_data + gap->ga_len) {
@@ -1928,7 +1928,7 @@ void foldtext_cleanup(char_u *str)
}
parseMarker(curwin);
- for (s = str; *s != NUL; ) {
+ for (s = str; *s != NUL;) {
size_t len = 0;
if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0) {
len = foldstartmarkerlen;
@@ -2603,7 +2603,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level,
}
// delete following folds that end before the current line
- for (;; ) {
+ for (;;) {
fp2 = fp + 1;
if (fp2 >= (fold_T *)gap->ga_data + gap->ga_len
|| fp2->fd_top > flp->lnum) {