diff options
author | Thomas Wienecke <wienecke.t@gmail.com> | 2014-04-10 19:32:38 +0200 |
---|---|---|
committer | Thomas Wienecke <wienecke.t@gmail.com> | 2014-05-03 17:41:06 +0200 |
commit | d10064df28932176bc0bedf06a569c64686dee90 (patch) | |
tree | 5e8522634e64e704fbad3a103016141b2e02821b | |
parent | 5446fbad8818204928af778f766e66a7c611dc53 (diff) | |
download | rneovim-d10064df28932176bc0bedf06a569c64686dee90.tar.gz rneovim-d10064df28932176bc0bedf06a569c64686dee90.tar.bz2 rneovim-d10064df28932176bc0bedf06a569c64686dee90.zip |
Remove unused function get_fpos_of_mouse.
-rw-r--r-- | src/ui.c | 36 | ||||
-rw-r--r-- | src/ui.h | 1 |
2 files changed, 0 insertions, 37 deletions
@@ -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. @@ -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 */ |