diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 11:44:06 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-06 11:00:29 +0200 |
commit | 21a31ea9294ef923a9d258c668d2864f4409cf1c (patch) | |
tree | 9337f23f9b8c1b7b4dc1ec54cabc6da0ff46ae8d /src/nvim/extmark.c | |
parent | 8bbeab9989d5f905ce2e4512e9967ee99d859f70 (diff) | |
download | rneovim-21a31ea9294ef923a9d258c668d2864f4409cf1c.tar.gz rneovim-21a31ea9294ef923a9d258c668d2864f4409cf1c.tar.bz2 rneovim-21a31ea9294ef923a9d258c668d2864f4409cf1c.zip |
refactor: enable -Wconversion warning for edit.c
Work on https://github.com/neovim/neovim/issues/567
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r-- | src/nvim/extmark.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index 1b0e2c8590..09ea2be4fe 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -417,7 +417,7 @@ static void u_extmark_set(buf_T *buf, uint64_t mark, int row, colnr_T col) /// /// useful when we cannot simply reverse the operation. This will do nothing on /// redo, enforces correct position when undo. -void u_extmark_copy(buf_T *buf, int l_row, colnr_T l_col, int u_row, colnr_T u_col) +void u_extmark_copy(buf_T *buf, linenr_T l_row, colnr_T l_col, linenr_T u_row, colnr_T u_col) { u_header_T *uhp = u_force_get_undo_header(buf); if (!uhp) { @@ -427,7 +427,7 @@ void u_extmark_copy(buf_T *buf, int l_row, colnr_T l_col, int u_row, colnr_T u_c ExtmarkUndoObject undo; MarkTreeIter itr[1] = { 0 }; - marktree_itr_get(buf->b_marktree, l_row, l_col, itr); + marktree_itr_get(buf->b_marktree, (int32_t)l_row, l_col, itr); while (true) { mtkey_t mark = marktree_itr_current(itr); if (mark.pos.row < 0 @@ -553,7 +553,7 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, long amount, lon // the end column of the new region. // @param new_byte Byte extent of the new region. // @param undo -void extmark_splice(buf_T *buf, int start_row, colnr_T start_col, int old_row, colnr_T old_col, +void extmark_splice(buf_T *buf, linenr_T start_row, colnr_T start_col, int old_row, colnr_T old_col, bcount_t old_byte, int new_row, colnr_T new_col, bcount_t new_byte, ExtmarkOp undo) { @@ -573,7 +573,7 @@ void extmark_splice(buf_T *buf, int start_row, colnr_T start_col, int old_row, c undo); } -void extmark_splice_impl(buf_T *buf, int start_row, colnr_T start_col, bcount_t start_byte, +void extmark_splice_impl(buf_T *buf, linenr_T start_row, colnr_T start_col, bcount_t start_byte, int old_row, colnr_T old_col, bcount_t old_byte, int new_row, colnr_T new_col, bcount_t new_byte, ExtmarkOp undo) { @@ -588,13 +588,13 @@ void extmark_splice_impl(buf_T *buf, int start_row, colnr_T start_col, bcount_t // beginning and right-gravity at the end need not be preserved. // Also be smart about marks that already have been saved (important for // merge!) - int end_row = start_row + old_row; + linenr_T end_row = start_row + old_row; int end_col = (old_row ? 0 : start_col) + old_col; u_extmark_copy(buf, start_row, start_col, end_row, end_col); } - marktree_splice(buf->b_marktree, start_row, start_col, + marktree_splice(buf->b_marktree, (int32_t)start_row, start_col, old_row, old_col, new_row, new_col); @@ -656,7 +656,7 @@ void extmark_splice_impl(buf_T *buf, int start_row, colnr_T start_col, bcount_t } } -void extmark_splice_cols(buf_T *buf, int start_row, colnr_T start_col, colnr_T old_col, +void extmark_splice_cols(buf_T *buf, linenr_T start_row, colnr_T start_col, colnr_T old_col, colnr_T new_col, ExtmarkOp undo) { extmark_splice(buf, start_row, start_col, |