aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-04-17 17:23:47 +0100
committerzeertzjq <zeertzjq@outlook.com>2023-04-28 23:04:09 +0800
commitff34c91194f9ab9d02808f2880029c38a4655eb5 (patch)
treefc0eb2a8e58b92e6af59411165a0127af63dd552 /src/nvim/window.c
parent715587f8e44e941ece6f17eb77620fd1b4719496 (diff)
downloadrneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.tar.gz
rneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.tar.bz2
rneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.zip
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) https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 88d9b95208..2e037aa699 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -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).