Mercurial > vim
diff src/window.c @ 32118:04d9dff67d99 v9.0.1390
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Commit: https://github.com/vim/vim/commit/14113fdf9cb3d588c0d1c3a210246b981cf5aad3
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Mar 7 17:13:51 2023 +0000
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Mar 2023 18:15:04 +0100 |
parents | 8c9f63a518f5 |
children | 6651b86aed3b |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -5622,7 +5622,7 @@ win_free( // If there already is an entry with "wi_win" set to NULL it // must be removed, it would never be used. // Skip "wip" itself, otherwise Coverity complains. - for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next) + FOR_ALL_BUF_WININFO(buf, wip2) if (wip2 != wip && wip2->wi_win == NULL) { if (wip2->wi_next != NULL) @@ -7378,7 +7378,7 @@ reset_lnums(void) /* * A snapshot of the window sizes, to restore them after closing the help - * window. + * or other window. * Only these fields are used: * fr_layout * fr_width @@ -7390,6 +7390,7 @@ reset_lnums(void) /* * Create a snapshot of the current frame sizes. + * "idx" is SNAP_HELP_IDX or SNAP_AUCMD_IDX. */ void make_snapshot(int idx) @@ -7473,6 +7474,7 @@ get_snapshot_curwin(int idx) * Restore a previously created snapshot, if there is any. * This is only done if the screen size didn't change and the window layout is * still the same. + * "idx" is SNAP_HELP_IDX or SNAP_AUCMD_IDX. */ void restore_snapshot(