Mercurial > vim
comparison src/optionstr.c @ 31886:b741e5243e58 v9.0.1275
patch 9.0.1275: the code for setting options is too complicated
Commit: https://github.com/vim/vim/commit/78012f55faf7444e554c0a97a589d99fa215bea9
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Feb 2 16:34:11 2023 +0000
patch 9.0.1275: the code for setting options is too complicated
Problem: The code for setting options is too complicated.
Solution: Refactor the do_set() function. (Yegappan Lakshmanan, Lewis
Russell, closes #11932)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 02 Feb 2023 17:45:05 +0100 |
parents | f5bbf51d65f7 |
children | 82da100c0e45 |
comparison
equal
deleted
inserted
replaced
31885:cc751d944b7e | 31886:b741e5243e58 |
---|---|
678 redraw_later_clear(); | 678 redraw_later_clear(); |
679 | 679 |
680 // Both 'term' and 'ttytype' point to T_NAME, only set the | 680 // Both 'term' and 'ttytype' point to T_NAME, only set the |
681 // P_ALLOCED flag on 'term'. | 681 // P_ALLOCED flag on 'term'. |
682 *opt_idx = findoption((char_u *)"term"); | 682 *opt_idx = findoption((char_u *)"term"); |
683 *free_oldval = (get_option_flags(*opt_idx) & P_ALLOCED); | 683 if (*opt_idx >= 0) |
684 *free_oldval = (get_option_flags(*opt_idx) & P_ALLOCED); | |
684 } | 685 } |
685 | 686 |
686 return errmsg; | 687 return errmsg; |
687 } | 688 } |
688 | 689 |