From 7190dba017e3aac0409c73ff1c954d18858cb3c9 Mon Sep 17 00:00:00 2001 From: ii14 <59243201+ii14@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:39:50 +0200 Subject: 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. --- src/nvim/terminal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nvim/terminal.c') 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; } -- cgit