mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.2171: mouse support not always available #11761
Problem: Mouse support not always available.
Solution: Enable mouse support also in tiny version. Do not define
FEAT_MOUSE_XTERM on MS-Windows (didn't really work).
a1cb1d1dce
This commit is contained in:
parent
cbcb50dcc9
commit
451af7f087
@ -1551,15 +1551,14 @@ void scroll_cursor_bot(int min_scroll, int set_topbot)
|
|||||||
/* Stop when scrolled nothing or at least "min_scroll", found "extra"
|
/* Stop when scrolled nothing or at least "min_scroll", found "extra"
|
||||||
* context for 'scrolloff' and counted all lines below the window. */
|
* context for 'scrolloff' and counted all lines below the window. */
|
||||||
if ((((scrolled <= 0 || scrolled >= min_scroll)
|
if ((((scrolled <= 0 || scrolled >= min_scroll)
|
||||||
&& extra >= (
|
&& extra >= (mouse_dragging > 0 ? mouse_dragging - 1 : p_so))
|
||||||
mouse_dragging > 0 ? mouse_dragging - 1 :
|
|
||||||
p_so))
|
|
||||||
|| boff.lnum + 1 > curbuf->b_ml.ml_line_count)
|
|| boff.lnum + 1 > curbuf->b_ml.ml_line_count)
|
||||||
&& loff.lnum <= curwin->w_botline
|
&& loff.lnum <= curwin->w_botline
|
||||||
&& (loff.lnum < curwin->w_botline
|
&& (loff.lnum < curwin->w_botline
|
||||||
|| loff.fill >= fill_below_window)
|
|| loff.fill >= fill_below_window)
|
||||||
)
|
) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Add one line above */
|
/* Add one line above */
|
||||||
topline_back(&loff);
|
topline_back(&loff);
|
||||||
@ -1590,9 +1589,8 @@ void scroll_cursor_bot(int min_scroll, int set_topbot)
|
|||||||
if (used > curwin->w_height_inner) {
|
if (used > curwin->w_height_inner) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (extra < (
|
if (extra < (mouse_dragging > 0 ? mouse_dragging - 1 : p_so)
|
||||||
mouse_dragging > 0 ? mouse_dragging - 1 :
|
|| scrolled < min_scroll) {
|
||||||
p_so) || scrolled < min_scroll) {
|
|
||||||
extra += boff.height;
|
extra += boff.height;
|
||||||
if (boff.lnum >= curwin->w_botline
|
if (boff.lnum >= curwin->w_botline
|
||||||
|| (boff.lnum + 1 == curwin->w_botline
|
|| (boff.lnum + 1 == curwin->w_botline
|
||||||
@ -1742,8 +1740,7 @@ void cursor_correct(void)
|
|||||||
}
|
}
|
||||||
validate_botline();
|
validate_botline();
|
||||||
if (curwin->w_botline == curbuf->b_ml.ml_line_count + 1
|
if (curwin->w_botline == curbuf->b_ml.ml_line_count + 1
|
||||||
&& mouse_dragging == 0
|
&& mouse_dragging == 0) {
|
||||||
) {
|
|
||||||
below_wanted = 0;
|
below_wanted = 0;
|
||||||
int max_off = (curwin->w_height_inner - 1) / 2;
|
int max_off = (curwin->w_height_inner - 1) / 2;
|
||||||
if (above_wanted > max_off) {
|
if (above_wanted > max_off) {
|
||||||
|
Loading…
Reference in New Issue
Block a user