aboutsummaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/ui.c b/src/ui.c
index 76686452d5..0bbcede97d 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -941,42 +941,6 @@ win_T *mouse_find_win(int *rowp, int *colp)
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(PROTO)
-/*
- * Translate window coordinates to buffer position without any side effects
- */
-int get_fpos_of_mouse(pos_T *mpos)
-{
- win_T *wp;
- int row = mouse_row;
- int col = mouse_col;
-
- if (row < 0 || col < 0) /* check if it makes sense */
- return IN_UNKNOWN;
-
- /* find the window where the row is in */
- wp = mouse_find_win(&row, &col);
- /*
- * winpos and height may change in win_enter()!
- */
- if (row >= wp->w_height) /* In (or below) status line */
- return IN_STATUS_LINE;
- if (col >= wp->w_width) /* In vertical separator line */
- return IN_SEP_LINE;
-
- if (wp != curwin)
- return IN_UNKNOWN;
-
- /* compute the position in the buffer line from the posn on the screen */
- if (mouse_comp_pos(curwin, &row, &col, &mpos->lnum))
- return IN_STATUS_LINE; /* past bottom */
-
- mpos->col = vcol2col(wp, mpos->lnum, col);
-
- if (mpos->col > 0)
- --mpos->col;
- mpos->coladd = 0;
- return IN_BUFFER;
-}
/*
* Convert a virtual (screen) column to a character column.