Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
32117:0741cc777264 | 32118:04d9dff67d99 |
---|---|
5620 wininfo_T *wip2; | 5620 wininfo_T *wip2; |
5621 | 5621 |
5622 // If there already is an entry with "wi_win" set to NULL it | 5622 // If there already is an entry with "wi_win" set to NULL it |
5623 // must be removed, it would never be used. | 5623 // must be removed, it would never be used. |
5624 // Skip "wip" itself, otherwise Coverity complains. | 5624 // Skip "wip" itself, otherwise Coverity complains. |
5625 for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next) | 5625 FOR_ALL_BUF_WININFO(buf, wip2) |
5626 if (wip2 != wip && wip2->wi_win == NULL) | 5626 if (wip2 != wip && wip2->wi_win == NULL) |
5627 { | 5627 { |
5628 if (wip2->wi_next != NULL) | 5628 if (wip2->wi_next != NULL) |
5629 wip2->wi_next->wi_prev = wip2->wi_prev; | 5629 wip2->wi_next->wi_prev = wip2->wi_prev; |
5630 if (wip2->wi_prev == NULL) | 5630 if (wip2->wi_prev == NULL) |
7376 } | 7376 } |
7377 } | 7377 } |
7378 | 7378 |
7379 /* | 7379 /* |
7380 * A snapshot of the window sizes, to restore them after closing the help | 7380 * A snapshot of the window sizes, to restore them after closing the help |
7381 * window. | 7381 * or other window. |
7382 * Only these fields are used: | 7382 * Only these fields are used: |
7383 * fr_layout | 7383 * fr_layout |
7384 * fr_width | 7384 * fr_width |
7385 * fr_height | 7385 * fr_height |
7386 * fr_next | 7386 * fr_next |
7388 * fr_win (only valid for the old curwin, NULL otherwise) | 7388 * fr_win (only valid for the old curwin, NULL otherwise) |
7389 */ | 7389 */ |
7390 | 7390 |
7391 /* | 7391 /* |
7392 * Create a snapshot of the current frame sizes. | 7392 * Create a snapshot of the current frame sizes. |
7393 * "idx" is SNAP_HELP_IDX or SNAP_AUCMD_IDX. | |
7393 */ | 7394 */ |
7394 void | 7395 void |
7395 make_snapshot(int idx) | 7396 make_snapshot(int idx) |
7396 { | 7397 { |
7397 clear_snapshot(curtab, idx); | 7398 clear_snapshot(curtab, idx); |
7471 | 7472 |
7472 /* | 7473 /* |
7473 * Restore a previously created snapshot, if there is any. | 7474 * Restore a previously created snapshot, if there is any. |
7474 * This is only done if the screen size didn't change and the window layout is | 7475 * This is only done if the screen size didn't change and the window layout is |
7475 * still the same. | 7476 * still the same. |
7477 * "idx" is SNAP_HELP_IDX or SNAP_AUCMD_IDX. | |
7476 */ | 7478 */ |
7477 void | 7479 void |
7478 restore_snapshot( | 7480 restore_snapshot( |
7479 int idx, | 7481 int idx, |
7480 int close_curwin) // closing current window | 7482 int close_curwin) // closing current window |