aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-08-19 23:49:25 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-08-19 23:49:25 -0400
commite1c330a486c184152cb48d637c6d04caba5290bd (patch)
treeb2379cae30ea446456681d1dc62d80ef95345f69 /src/nvim/option.c
parent0b7bff5bb71ddc2e9c41863ec41b9aea74d0fe75 (diff)
parent888a31ba454cf9c054527a26459c112593efa54b (diff)
downloadrneovim-e1c330a486c184152cb48d637c6d04caba5290bd.tar.gz
rneovim-e1c330a486c184152cb48d637c6d04caba5290bd.tar.bz2
rneovim-e1c330a486c184152cb48d637c6d04caba5290bd.zip
Merge pull request #1024 from war1025/dev/for_all_buffers
Add FOR_ALL_BUFFERS helper
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 943bda88dc..63ea2ee338 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -7677,7 +7677,6 @@ static void paste_option_changed(void)
static int save_ru = 0;
static int save_ri = 0;
static int save_hkmap = 0;
- buf_T *buf;
if (p_paste) {
/*
@@ -7686,7 +7685,7 @@ static void paste_option_changed(void)
*/
if (!old_p_paste) {
/* save options for each buffer */
- for (buf = firstbuf; buf != NULL; buf = buf->b_next) {
+ FOR_ALL_BUFFERS(buf) {
buf->b_p_tw_nopaste = buf->b_p_tw;
buf->b_p_wm_nopaste = buf->b_p_wm;
buf->b_p_sts_nopaste = buf->b_p_sts;
@@ -7710,7 +7709,7 @@ static void paste_option_changed(void)
* already on.
*/
/* set options for each buffer */
- for (buf = firstbuf; buf != NULL; buf = buf->b_next) {
+ FOR_ALL_BUFFERS(buf) {
buf->b_p_tw = 0; /* textwidth is 0 */
buf->b_p_wm = 0; /* wrapmargin is 0 */
buf->b_p_sts = 0; /* softtabstop is 0 */
@@ -7735,7 +7734,7 @@ static void paste_option_changed(void)
*/
else if (old_p_paste) {
/* restore options for each buffer */
- for (buf = firstbuf; buf != NULL; buf = buf->b_next) {
+ FOR_ALL_BUFFERS(buf) {
buf->b_p_tw = buf->b_p_tw_nopaste;
buf->b_p_wm = buf->b_p_wm_nopaste;
buf->b_p_sts = buf->b_p_sts_nopaste;