diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-09 11:45:46 +0200 |
commit | 8e932480f61d6101bf8bea1abc07ed93826221fd (patch) | |
tree | 06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/terminal.c | |
parent | dacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff) | |
download | rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.gz rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.bz2 rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 169525da20..5d1bd09a6c 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -714,7 +714,7 @@ static bool is_filter_char(int c) return !!(tpf_flags & flag); } -void terminal_paste(long count, char **y_array, size_t y_size) +void terminal_paste(int count, char **y_array, size_t y_size) { if (y_size == 0) { return; @@ -1584,7 +1584,7 @@ static void refresh_terminal(Terminal *term) } return; } - long ml_before = buf->b_ml.ml_line_count; + linenr_T ml_before = buf->b_ml.ml_line_count; // refresh_ functions assume the terminal buffer is current aco_save_T aco; @@ -1594,7 +1594,7 @@ static void refresh_terminal(Terminal *term) refresh_screen(term, buf); aucmd_restbuf(&aco); - long ml_added = buf->b_ml.ml_line_count - ml_before; + int ml_added = buf->b_ml.ml_line_count - ml_before; adjust_topline(term, buf, ml_added); } @@ -1754,7 +1754,7 @@ static void refresh_screen(Terminal *term, buf_T *buf) term->invalid_end = -1; } -static void adjust_topline(Terminal *term, buf_T *buf, long added) +static void adjust_topline(Terminal *term, buf_T *buf, int added) { FOR_ALL_TAB_WINDOWS(tp, wp) { if (wp->w_buffer == buf) { |