diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-04-06 22:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 22:39:50 +0200 |
commit | 7190dba017e3aac0409c73ff1c954d18858cb3c9 (patch) | |
tree | 321f4b2dd65e4a06047beee876d3c2e0d2dbf7d0 /src/nvim/terminal.c | |
parent | 0bc323850410df4c3c1dd8fabded9d2000189270 (diff) | |
download | rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.gz rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.bz2 rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.zip |
refactor: remove use of reserved c++ keywords
libnvim couldn't be easily used in C++ due to the use of reserved keywords.
Additionally, add explicit casts to *alloc function calls used in inline
functions, as C++ doesn't allow implicit casts from void pointers.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 76fa3049f6..c774dbe384 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -896,13 +896,13 @@ static int term_moverect(VTermRect dest, VTermRect src, void *data) return 1; } -static int term_movecursor(VTermPos new, VTermPos old, int visible, void *data) +static int term_movecursor(VTermPos new_pos, VTermPos old_pos, int visible, void *data) { Terminal *term = data; - term->cursor.row = new.row; - term->cursor.col = new.col; - invalidate_terminal(term, old.row, old.row + 1); - invalidate_terminal(term, new.row, new.row + 1); + term->cursor.row = new_pos.row; + term->cursor.col = new_pos.col; + invalidate_terminal(term, old_pos.row, old_pos.row + 1); + invalidate_terminal(term, new_pos.row, new_pos.row + 1); return 1; } |