Mercurial > vim
comparison src/evalwindow.c @ 19934:3ff714d765ba v8.2.0523
patch 8.2.0523: loops are repeated
Commit: https://github.com/vim/vim/commit/00d253e2b2f435a5386582c3f857008e7ac355c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 6 22:13:01 2020 +0200
patch 8.2.0523: loops are repeated
Problem: Loops are repeated.
Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5882)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Apr 2020 22:15:39 +0200 |
parents | 435726a03481 |
children | 0ab45b558621 |
comparison
equal
deleted
inserted
replaced
19933:005e707a7988 | 19934:3ff714d765ba |
---|---|
442 dict_add_number(dict, "tabnr", tp_idx); | 442 dict_add_number(dict, "tabnr", tp_idx); |
443 | 443 |
444 l = list_alloc(); | 444 l = list_alloc(); |
445 if (l != NULL) | 445 if (l != NULL) |
446 { | 446 { |
447 for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin; | 447 FOR_ALL_WINDOWS_IN_TAB(tp, wp) |
448 wp != NULL; wp = wp->w_next) | |
449 list_append_number(l, (varnumber_T)wp->w_id); | 448 list_append_number(l, (varnumber_T)wp->w_id); |
450 dict_add_list(dict, "windows", l); | 449 dict_add_list(dict, "windows", l); |
451 } | 450 } |
452 | 451 |
453 // Make a reference to tabpage variables | 452 // Make a reference to tabpage variables |