Mercurial > vim
comparison src/mark.c @ 9649:fd9727ae3c49 v7.4.2101
commit https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 24 22:04:11 2016 +0200
patch 7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant.
Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Jul 2016 22:15:07 +0200 |
parents | 1003973c99df |
children | 4aead6a9b7a9 |
comparison
equal
deleted
inserted
replaced
9648:227649fd4301 | 9649:fd9727ae3c49 |
---|---|
1862 #else | 1862 #else |
1863 set_last_cursor(curwin); | 1863 set_last_cursor(curwin); |
1864 #endif | 1864 #endif |
1865 | 1865 |
1866 fputs(_("\n# History of marks within files (newest to oldest):\n"), fp_out); | 1866 fputs(_("\n# History of marks within files (newest to oldest):\n"), fp_out); |
1867 for (buf = firstbuf; buf != NULL; buf = buf->b_next) | 1867 FOR_ALL_BUFFERS(buf) |
1868 { | 1868 { |
1869 /* | 1869 /* |
1870 * Only write something if buffer has been loaded and at least one | 1870 * Only write something if buffer has been loaded and at least one |
1871 * mark is set. | 1871 * mark is set. |
1872 */ | 1872 */ |
2016 } | 2016 } |
2017 } | 2017 } |
2018 else /* fp_out != NULL */ | 2018 else /* fp_out != NULL */ |
2019 { | 2019 { |
2020 /* This is slow if there are many buffers!! */ | 2020 /* This is slow if there are many buffers!! */ |
2021 for (buf = firstbuf; buf != NULL; buf = buf->b_next) | 2021 FOR_ALL_BUFFERS(buf) |
2022 if (buf->b_ffname != NULL) | 2022 if (buf->b_ffname != NULL) |
2023 { | 2023 { |
2024 home_replace(NULL, buf->b_ffname, name_buf, LSIZE, TRUE); | 2024 home_replace(NULL, buf->b_ffname, name_buf, LSIZE, TRUE); |
2025 if (fnamecmp(str, name_buf) == 0) | 2025 if (fnamecmp(str, name_buf) == 0) |
2026 break; | 2026 break; |