aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.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/buffer.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/buffer.c')
-rw-r--r--src/nvim/buffer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 88938d5099..1512d6bcd5 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1305,7 +1305,7 @@ int do_buffer(int action, int start, int dir, int count, int forceit)
if (buf == NULL) { // No previous buffer, Try 2'nd approach
forward = true;
buf = curbuf->b_next;
- for (;; ) {
+ for (;;) {
if (buf == NULL) {
if (!forward) { // tried both directions
break;
@@ -2163,7 +2163,7 @@ int buflist_findpat(const char_u *pattern, const char_u *pattern_end, bool unlis
// First try finding a listed buffer. If not found and "unlisted"
// is true, try finding an unlisted buffer.
find_listed = true;
- for (;; ) {
+ for (;;) {
for (attempt = 0; attempt <= 3; attempt++) {
// may add '^' and '$'
if (toggledollar) {
@@ -3511,7 +3511,7 @@ int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use
// Proceed character by character through the statusline format string
// fmt_p is the current position in the input buffer
- for (char_u *fmt_p = usefmt; *fmt_p; ) {
+ for (char_u *fmt_p = usefmt; *fmt_p;) {
if (curitem == (int)stl_items_len) {
size_t new_len = stl_items_len * 3 / 2;
@@ -4407,7 +4407,7 @@ int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use
// string to find the last character that will fit.
trunc_p = out;
width = 0;
- for (;; ) {
+ for (;;) {
width += ptr2cells(trunc_p);
if (width >= maxwidth) {
break;
@@ -4758,7 +4758,7 @@ void do_arg_all(int count, int forceit, int keep_tabs)
if (had_tab > 0) {
goto_tabpage_tp(first_tabpage, true, true);
}
- for (;; ) {
+ for (;;) {
win_T *wpnext = NULL;
tpnext = curtab->tp_next;
for (win_T *wp = firstwin; wp != NULL; wp = wpnext) {
@@ -5009,7 +5009,7 @@ void ex_buffer_all(exarg_T *eap)
if (had_tab > 0) {
goto_tabpage_tp(first_tabpage, true, true);
}
- for (;; ) {
+ for (;;) {
tpnext = curtab->tp_next;
for (wp = firstwin; wp != NULL; wp = wpnext) {
wpnext = wp->w_next;
@@ -5020,8 +5020,8 @@ void ex_buffer_all(exarg_T *eap)
: wp->w_width != Columns)
|| (had_tab > 0 && wp != firstwin))
&& !ONE_WINDOW
- && !(wp->w_closing ||
- wp->w_buffer->b_locked > 0)) {
+ && !(wp->w_closing
+ || wp->w_buffer->b_locked > 0)) {
win_close(wp, false);
wpnext = firstwin; // just in case an autocommand does
// something strange with windows
@@ -5138,7 +5138,7 @@ void ex_buffer_all(exarg_T *eap)
/*
* Close superfluous windows.
*/
- for (wp = lastwin; open_wins > count; ) {
+ for (wp = lastwin; open_wins > count;) {
r = (buf_hide(wp->w_buffer) || !bufIsChanged(wp->w_buffer)
|| autowrite(wp->w_buffer, false) == OK);
if (!win_valid(wp)) {