mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
refactor: uncrustify
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
This commit is contained in:
@@ -1403,7 +1403,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 (;;) {
|
||||
while (true) {
|
||||
if (buf == NULL) {
|
||||
if (!forward) { // tried both directions
|
||||
break;
|
||||
@@ -2241,7 +2241,7 @@ int buflist_findpat(const char *pattern, const char *pattern_end, bool unlisted,
|
||||
// First try finding a listed buffer. If not found and "unlisted"
|
||||
// is true, try finding an unlisted buffer.
|
||||
find_listed = true;
|
||||
for (;;) {
|
||||
while (true) {
|
||||
for (attempt = 0; attempt <= 3; attempt++) {
|
||||
// may add '^' and '$'
|
||||
if (toggledollar) {
|
||||
@@ -3180,7 +3180,7 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
|
||||
bool dontwrite = bt_dontwrite(curbuf);
|
||||
vim_snprintf_add(buffer, IOSIZE, "\"%s%s%s%s%s%s",
|
||||
curbufIsChanged()
|
||||
? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ",
|
||||
? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ",
|
||||
(curbuf->b_flags & BF_NOTEDITED) && !dontwrite
|
||||
? _("[Not edited]") : "",
|
||||
(curbuf->b_flags & BF_NEW) && !dontwrite
|
||||
@@ -3609,7 +3609,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
if (had_tab > 0) {
|
||||
goto_tabpage_tp(first_tabpage, true, true);
|
||||
}
|
||||
for (;;) {
|
||||
while (true) {
|
||||
tpnext = curtab->tp_next;
|
||||
for (wp = firstwin; wp != NULL; wp = wpnext) {
|
||||
wpnext = wp->w_next;
|
||||
|
Reference in New Issue
Block a user