aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-04-17 22:18:58 +0200
committerdundargoc <gocdundar@gmail.com>2023-07-03 12:49:09 +0200
commitfcf3519c65a2d6736de437f686e788684a6c8564 (patch)
tree2c5ae2854f3688497b05f80bd0302feb9162a308 /src/nvim/option.c
parentf771d6247147b393238fe57065a96fb5e9635358 (diff)
downloadrneovim-fcf3519c65a2d6736de437f686e788684a6c8564.tar.gz
rneovim-fcf3519c65a2d6736de437f686e788684a6c8564.tar.bz2
rneovim-fcf3519c65a2d6736de437f686e788684a6c8564.zip
refactor: remove long
long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 0002329da3..598ae8e490 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -6198,13 +6198,13 @@ dict_T *get_winbuf_options(const int bufopt)
/// Return the effective 'scrolloff' value for the current window, using the
/// global value when appropriate.
-long get_scrolloff_value(win_T *wp)
+linenr_T get_scrolloff_value(win_T *wp)
{
// Disallow scrolloff in terminal-mode. #11915
if (State & MODE_TERMINAL) {
return 0;
}
- return wp->w_p_so < 0 ? p_so : wp->w_p_so;
+ return wp->w_p_so < 0 ? (linenr_T)p_so : (linenr_T)wp->w_p_so;
}
/// Return the effective 'sidescrolloff' value for the current window, using the