Mercurial > vim
comparison src/option.c @ 20007:aadd1cae2ff5 v8.2.0559
patch 8.2.0559: clearing a struct is verbose
Commit: https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 12 19:37:17 2020 +0200
patch 8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 12 Apr 2020 19:45:05 +0200 |
parents | 08f4dc2ba716 |
children | 9a67d41708d2 |
comparison
equal
deleted
inserted
replaced
20006:aee3c9266968 | 20007:aadd1cae2ff5 |
---|---|
1367 goto skip; | 1367 goto skip; |
1368 } | 1368 } |
1369 } | 1369 } |
1370 | 1370 |
1371 /* | 1371 /* |
1372 * allow '=' and ':' for hystorical reasons (MSDOS command.com | 1372 * allow '=' and ':' for historical reasons (MSDOS command.com |
1373 * allows only one '=' character per "set" command line. grrr. (jw) | 1373 * allows only one '=' character per "set" command line. grrr. (jw) |
1374 */ | 1374 */ |
1375 if (nextchar == '?' | 1375 if (nextchar == '?' |
1376 || (prefix == 1 | 1376 || (prefix == 1 |
1377 && vim_strchr((char_u *)"=:&<", nextchar) == NULL | 1377 && vim_strchr((char_u *)"=:&<", nextchar) == NULL |
5664 should_copy = FALSE; | 5664 should_copy = FALSE; |
5665 | 5665 |
5666 if (should_copy || (flags & BCO_ALWAYS)) | 5666 if (should_copy || (flags & BCO_ALWAYS)) |
5667 { | 5667 { |
5668 #ifdef FEAT_EVAL | 5668 #ifdef FEAT_EVAL |
5669 vim_memset(buf->b_p_script_ctx, 0, sizeof(buf->b_p_script_ctx)); | 5669 CLEAR_FIELD(buf->b_p_script_ctx); |
5670 init_buf_opt_idx(); | 5670 init_buf_opt_idx(); |
5671 #endif | 5671 #endif |
5672 // Don't copy the options specific to a help buffer when | 5672 // Don't copy the options specific to a help buffer when |
5673 // BCO_NOHELP is given or the options were initialized already | 5673 // BCO_NOHELP is given or the options were initialized already |
5674 // (jumping back to a help file with CTRL-T or CTRL-O) | 5674 // (jumping back to a help file with CTRL-T or CTRL-O) |