aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/mouse.c2
-rw-r--r--src/nvim/term.c9
-rw-r--r--src/nvim/term.h4
3 files changed, 1 insertions, 14 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 93b5c7b3c0..439cdbd5c8 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -169,11 +169,9 @@ retnomove:
// (MOUSE_FOCUS was set above if we dragged first).
if (dragwin == NULL || (flags & MOUSE_RELEASED))
win_enter(wp, true); // can make wp invalid!
-# ifdef CHECK_DOUBLE_CLICK
// set topline, to be able to check for double click ourselves
if (curwin != old_curwin)
set_mouse_topline(curwin);
-# endif
if (on_status_line) { // In (or below) status line
// Don't use start_arrow() if we're in the same window
if (curwin == old_curwin)
diff --git a/src/nvim/term.c b/src/nvim/term.c
index 064535a1dd..54508b1daa 100644
--- a/src/nvim/term.c
+++ b/src/nvim/term.c
@@ -2819,11 +2819,9 @@ static void switch_to_8bit(void)
LOG_TR("Switching to 8 bit");
}
-#ifdef CHECK_DOUBLE_CLICK
static linenr_T orig_topline = 0;
static int orig_topfill = 0;
-#endif
-#if defined(CHECK_DOUBLE_CLICK) || defined(PROTO)
+
/*
* Checking for double clicks ourselves.
* "orig_topline" is used to avoid detecting a double-click when the window
@@ -2838,7 +2836,6 @@ void set_mouse_topline(win_T *wp)
orig_topline = wp->w_topline;
orig_topfill = wp->w_topfill;
}
-#endif
/*
* Check if typebuf.tb_buf[] contains a terminal key code.
@@ -3529,7 +3526,6 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen)
is_drag = TRUE;
current_button = held_button;
} else if (wheel_code == 0) {
-# ifdef CHECK_DOUBLE_CLICK
{
static int orig_mouse_col = 0;
static int orig_mouse_row = 0;
@@ -3563,9 +3559,6 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen)
orig_topline = curwin->w_topline;
orig_topfill = curwin->w_topfill;
}
-# else
- orig_num_clicks = NUM_MOUSE_CLICKS(mouse_code);
-# endif
is_click = TRUE;
orig_mouse_code = mouse_code;
}
diff --git a/src/nvim/term.h b/src/nvim/term.h
index 17154b8c26..3f70f484a7 100644
--- a/src/nvim/term.h
+++ b/src/nvim/term.h
@@ -52,10 +52,6 @@
* 128 = 16384 columns, now it's reduced to 10000. */
#define MOUSE_COLOFF 10000
-#if defined(UNIX)
-# define CHECK_DOUBLE_CLICK 1 /* Checking for double clicks ourselves. */
-#endif
-
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "term.h.generated.h"
#endif