diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-20 17:07:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-20 17:07:35 +0200 |
| commit | bde46fdeceec8f9dd675f0e31080d732308573d9 (patch) | |
| tree | 0044b6fd7f2f1682941e053ea686ec98a1d4f898 /src/nvim/tui | |
| parent | 3280765f2dde4ba6d120387908d735ed763db01c (diff) | |
| parent | 7dc7d2f83f30eb2df1c5408ffceda244ced2f468 (diff) | |
| download | rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.tar.gz rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.tar.bz2 rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.zip | |
Merge #6772 from ZyX-I/fix-pvs-errors
Diffstat (limited to 'src/nvim/tui')
| -rw-r--r-- | src/nvim/tui/tui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 4a81b32199..4ff7993f4a 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -36,6 +36,7 @@ #include "nvim/tui/tui.h" #include "nvim/cursor_shape.h" #include "nvim/syntax.h" +#include "nvim/macros.h" // Space reserved in the output buffer to restore the cursor to normal when // flushing. No existing terminal will require 32 bytes to do that. @@ -1079,7 +1080,7 @@ static void flush_buf(UI *ui, bool toggle_cursor) buf.base = data->buf; buf.len = data->bufpos; - uv_write(&req, (uv_stream_t *)&data->output_handle, &buf, 1, NULL); + uv_write(&req, STRUCT_CAST(uv_stream_t, &data->output_handle), &buf, 1, NULL); uv_run(&data->write_loop, UV_RUN_DEFAULT); data->bufpos = 0; @@ -1122,13 +1123,13 @@ static const char *tui_tk_ti_getstr(const char *name, const char *value, if (strequal(name, "key_backspace")) { ILOG("libtermkey:kbs=%s", value); - if (stty_erase != NULL && stty_erase[0] != 0) { + if (stty_erase[0] != 0) { return stty_erase; } } else if (strequal(name, "key_dc")) { ILOG("libtermkey:kdch1=%s", value); // Vim: "If <BS> and <DEL> are now the same, redefine <DEL>." - if (stty_erase != NULL && value != NULL && strequal(stty_erase, value)) { + if (value != NULL && strequal(stty_erase, value)) { return stty_erase[0] == DEL ? CTRL_H_STR : DEL_STR; } } |