diff options
Diffstat (limited to 'src/mouse.c')
-rw-r--r-- | src/mouse.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/mouse.c b/src/mouse.c index 12895f8094..452a30131b 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -482,17 +482,13 @@ do_mouse( { c1 = TabPageIdxs[mouse_col]; tabpage_move(c1 <= 0 ? 9999 : c1 < tabpage_index(curtab) - ? c1 - 1 : c1); + ? c1 - 1 : c1); } return FALSE; } // click in a tab selects that tab page - if (is_click -# ifdef FEAT_CMDWIN - && cmdwin_type == 0 -# endif - && mouse_col < Columns) + if (is_click && cmdwin_type == 0 && mouse_col < Columns) { in_tab_line = TRUE; c1 = TabPageIdxs[mouse_col]; @@ -745,7 +741,7 @@ do_mouse( } #endif -#if defined(FEAT_CLIPBOARD) && defined(FEAT_CMDWIN) +#if defined(FEAT_CLIPBOARD) if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available) { clip_modeless(which_button, is_click, is_drag); @@ -1602,7 +1598,7 @@ retnomove: end_visual_mode_keep_button(); redraw_curbuf_later(UPD_INVERTED); // delete the inversion } -#if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) +#if defined(FEAT_CLIPBOARD) // Continue a modeless selection in another window. if (cmdwin_type != 0 && row < curwin->w_winrow) return IN_OTHER_WIN; @@ -1732,10 +1728,7 @@ retnomove: # ifdef FEAT_RIGHTLEFT wp->w_p_rl ? col < wp->w_width - wp->w_p_fdc : # endif - col >= wp->w_p_fdc -# ifdef FEAT_CMDWIN - + (cmdwin_type == 0 && wp == curwin ? 0 : 1) -# endif + col >= wp->w_p_fdc + (cmdwin_type == 0 && wp == curwin ? 0 : 1) ) #endif && (flags & MOUSE_MAY_STOP_VIS)))) @@ -1743,7 +1736,6 @@ retnomove: end_visual_mode_keep_button(); redraw_curbuf_later(UPD_INVERTED); // delete the inversion } -#ifdef FEAT_CMDWIN if (cmdwin_type != 0 && wp != curwin) { // A click outside the command-line window: Use modeless @@ -1759,7 +1751,6 @@ retnomove: wp = curwin; # endif } -#endif #if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL) if (popup_is_popup(curwin) && curbuf->b_term != NULL) // terminal in popup window: don't jump to another window @@ -1848,7 +1839,7 @@ retnomove: redraw_curbuf_later(UPD_INVERTED); // delete the inversion } -#if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) +#if defined(FEAT_CLIPBOARD) // Continue a modeless selection in another window. if (cmdwin_type != 0 && row < curwin->w_winrow) return IN_OTHER_WIN; @@ -1986,10 +1977,7 @@ retnomove: # ifdef FEAT_RIGHTLEFT curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc : # endif - col >= curwin->w_p_fdc -# ifdef FEAT_CMDWIN - + (cmdwin_type == 0 ? 0 : 1) -# endif + col >= curwin->w_p_fdc + (cmdwin_type == 0 ? 0 : 1) ) mouse_char = ' '; #endif |