From d10064df28932176bc0bedf06a569c64686dee90 Mon Sep 17 00:00:00 2001 From: Thomas Wienecke Date: Thu, 10 Apr 2014 19:32:38 +0200 Subject: [PATCH] Remove unused function get_fpos_of_mouse. --- src/ui.c | 36 ------------------------------------ src/ui.h | 1 - 2 files changed, 37 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. diff --git a/src/ui.h b/src/ui.h index fd61c4b845..7108459323 100644 --- a/src/ui.h +++ b/src/ui.h @@ -25,7 +25,6 @@ int check_row(int row); int jump_to_mouse(int flags, int *inclusive, int which_button); int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump); win_T *mouse_find_win(int *rowp, int *colp); -int get_fpos_of_mouse(pos_T *mpos); int vcol2col(win_T *wp, linenr_T lnum, int vcol); void im_save_status(long *psave); #endif /* NEOVIM_UI_H */