aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index d980699162..915399ec78 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3995,82 +3995,6 @@ static bool ins_bs(int c, int mode, int *inserted_space_p)
return did_backspace;
}
-static void ins_mouse(int c)
-{
- pos_T tpos;
- win_T *old_curwin = curwin;
-
- undisplay_dollar();
- tpos = curwin->w_cursor;
- if (do_mouse(NULL, c, BACKWARD, 1, 0)) {
- win_T *new_curwin = curwin;
-
- if (curwin != old_curwin && win_valid(old_curwin)) {
- // Mouse took us to another window. We need to go back to the
- // previous one to stop insert there properly.
- curwin = old_curwin;
- curbuf = curwin->w_buffer;
- if (bt_prompt(curbuf)) {
- // Restart Insert mode when re-entering the prompt buffer.
- curbuf->b_prompt_insert = 'A';
- }
- }
- start_arrow(curwin == old_curwin ? &tpos : NULL);
- if (curwin != new_curwin && win_valid(new_curwin)) {
- curwin = new_curwin;
- curbuf = curwin->w_buffer;
- }
- can_cindent = true;
- }
-
- // redraw status lines (in case another window became active)
- redraw_statuslines();
-}
-
-static void ins_mousescroll(int dir)
-{
- win_T *const old_curwin = curwin;
- pos_T tpos = curwin->w_cursor;
-
- if (mouse_row >= 0 && mouse_col >= 0) {
- int row = mouse_row, col = mouse_col, grid = mouse_grid;
-
- // find the window at the pointer coordinates
- win_T *wp = mouse_find_win(&grid, &row, &col);
- if (wp == NULL) {
- return;
- }
- curwin = wp;
- curbuf = curwin->w_buffer;
- }
- if (curwin == old_curwin) {
- undisplay_dollar();
- }
-
- // Don't scroll the window in which completion is being done.
- if (!pum_visible() || curwin != old_curwin) {
- if (dir == MSCR_DOWN || dir == MSCR_UP) {
- if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) {
- scroll_redraw(dir, curwin->w_botline - curwin->w_topline);
- } else if (p_mousescroll_vert > 0) {
- scroll_redraw(dir, (linenr_T)p_mousescroll_vert);
- }
- } else {
- mouse_scroll_horiz(dir);
- }
- }
-
- curwin->w_redr_status = true;
-
- curwin = old_curwin;
- curbuf = curwin->w_buffer;
-
- if (!equalpos(curwin->w_cursor, tpos)) {
- start_arrow(&tpos);
- can_cindent = true;
- }
-}
-
static void ins_left(void)
{
pos_T tpos;