mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-patch:9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
af93691b53
This commit is contained in:
@@ -6089,7 +6089,7 @@ static void frame_setwidth(frame_T *curfrp, int width)
|
||||
}
|
||||
|
||||
// Check 'winminheight' for a valid value and reduce it if needed.
|
||||
void did_set_winminheight(void)
|
||||
const char *did_set_winminheight(optset_T *args FUNC_ATTR_UNUSED)
|
||||
{
|
||||
bool first = true;
|
||||
|
||||
@@ -6106,10 +6106,11 @@ void did_set_winminheight(void)
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Check 'winminwidth' for a valid value and reduce it if needed.
|
||||
void did_set_winminwidth(void)
|
||||
const char *did_set_winminwidth(optset_T *args FUNC_ATTR_UNUSED)
|
||||
{
|
||||
bool first = true;
|
||||
|
||||
@@ -6126,6 +6127,7 @@ void did_set_winminwidth(void)
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/// Status line of dragwin is dragged "offset" lines down (negative is up).
|
||||
|
Reference in New Issue
Block a user