Mercurial > vim
comparison src/option.c @ 14748:00da090af0ab v8.1.0386
patch 8.1.0386: cannot test with non-default option value
commit https://github.com/vim/vim/commit/fe8ef98dd1d0b7d296d7db29b1e2fd1b56b788de
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 13 20:31:54 2018 +0200
patch 8.1.0386: cannot test with non-default option value
Problem: Cannot test with non-default option value.
Solution: Add test_option_not_set().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 13 Sep 2018 20:45:05 +0200 |
parents | daf8afe6279b |
children | cca823b02a04 |
comparison
equal
deleted
inserted
replaced
14747:5d8362ca850a | 14748:00da090af0ab |
---|---|
12478 } | 12478 } |
12479 | 12479 |
12480 /* | 12480 /* |
12481 * Reset the flag indicating option "name" was set. | 12481 * Reset the flag indicating option "name" was set. |
12482 */ | 12482 */ |
12483 void | 12483 int |
12484 reset_option_was_set(char_u *name) | 12484 reset_option_was_set(char_u *name) |
12485 { | 12485 { |
12486 int idx = findoption(name); | 12486 int idx = findoption(name); |
12487 | 12487 |
12488 if (idx >= 0) | 12488 if (idx >= 0) |
12489 { | |
12489 options[idx].flags &= ~P_WAS_SET; | 12490 options[idx].flags &= ~P_WAS_SET; |
12491 return OK; | |
12492 } | |
12493 return FAIL; | |
12490 } | 12494 } |
12491 | 12495 |
12492 /* | 12496 /* |
12493 * compatible_set() - Called when 'compatible' has been set or unset. | 12497 * compatible_set() - Called when 'compatible' has been set or unset. |
12494 * | 12498 * |