summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-10 18:45:26 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-10 18:45:26 +0100
commitd23a823669d93fb2a570a039173eefe4856ac806 (patch)
tree617130258eae70e3bd7ef7b6da9c494ffee7b572 /src/term.c
parent42443c7d7fecc3a2a72154bb6139b028438617c2 (diff)
downloadvim-git-d23a823669d93fb2a570a039173eefe4856ac806.tar.gz
patch 8.0.1496: clearing a pointer takes two linesv8.0.1496
Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c
index 6303e10d5..1f17d9f2f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2502,7 +2502,8 @@ out_flush(void)
}
/*
- * out_flush_cursor(): flush the output buffer and redraw the cursor
+ * out_flush_cursor(): flush the output buffer and redraw the cursor.
+ * Does not flush recursively in the GUI to avoid slow drawing.
*/
void
out_flush_cursor(
@@ -3912,8 +3913,7 @@ clear_termcodes(void)
{
while (tc_len > 0)
vim_free(termcodes[--tc_len].code);
- vim_free(termcodes);
- termcodes = NULL;
+ VIM_CLEAR(termcodes);
tc_max_len = 0;
#ifdef HAVE_TGETENT
@@ -5648,7 +5648,7 @@ check_termcode(
/* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets
* added, then it's not mouse up/down. */
key_name[0] = (int)KS_EXTRA;
- if (wheel_code != 0
+ if (wheel_code != 0
&& (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE)
{
if (wheel_code & MOUSE_CTRL)