mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.0657: too many #ifdefs
Problem: Too many #ifdefs. Solution: Graduate the +cmdwin feature. Now the tiny and small builds are equal, drop the small build. (Martin Tournoij, closes #11268)
This commit is contained in:
committed by
Bram Moolenaar
parent
4ba5f1dab6
commit
7904fa420e
26
src/mouse.c
26
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
|
||||
|
Reference in New Issue
Block a user