diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 88938d5099..f2f4950e58 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; @@ -1587,7 +1587,7 @@ void do_autochdir(void) if (starting == 0 && curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname, kCdCauseAuto) == OK) { - post_chdir(kCdScopeGlobal, false); + last_chdir_reason = "autochdir"; shorten_fnames(true); } } @@ -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)) { |