Remove unused function get_fpos_of_mouse.

This commit is contained in:
Thomas Wienecke 2014-04-10 19:32:38 +02:00
parent 5446fbad88
commit d10064df28
2 changed files with 0 additions and 37 deletions

View File

@ -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.

View File

@ -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 */