Skip to content

Commit 2874103

Browse files
committed
updated for version 7.3.833
Problem: In the terminal the scroll wheel always scrolls the active window. Solution: Scroll the window under the mouse pointer, like in the GUI. (Bradie Rao)
1 parent 81a2d53 commit 2874103

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/edit.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9139,9 +9139,8 @@ ins_mousescroll(dir)
91399139

91409140
tpos = curwin->w_cursor;
91419141

9142-
# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
9143-
/* Currently the mouse coordinates are only known in the GUI. */
9144-
if (gui.in_use && mouse_row >= 0 && mouse_col >= 0)
9142+
# ifdef FEAT_WINDOWS
9143+
if (mouse_row >= 0 && mouse_col >= 0)
91459144
{
91469145
int row, col;
91479146

@@ -9191,7 +9190,7 @@ ins_mousescroll(dir)
91919190
# endif
91929191
}
91939192

9194-
# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
9193+
# ifdef FEAT_WINDOWS
91959194
curwin->w_redr_status = TRUE;
91969195

91979196
curwin = old_curwin;

src/normal.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4649,11 +4649,10 @@ nv_screengo(oap, dir, dist)
46494649
nv_mousescroll(cap)
46504650
cmdarg_T *cap;
46514651
{
4652-
# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
4652+
# ifdef FEAT_WINDOWS
46534653
win_T *old_curwin = curwin;
46544654

4655-
/* Currently we only get the mouse coordinates in the GUI. */
4656-
if (gui.in_use && mouse_row >= 0 && mouse_col >= 0)
4655+
if (mouse_row >= 0 && mouse_col >= 0)
46574656
{
46584657
int row, col;
46594658

@@ -4698,7 +4697,7 @@ nv_mousescroll(cap)
46984697
}
46994698
# endif
47004699

4701-
# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
4700+
# ifdef FEAT_WINDOWS
47024701
curwin->w_redr_status = TRUE;
47034702

47044703
curwin = old_curwin;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ static char *(features[]) =
728728

729729
static int included_patches[] =
730730
{ /* Add new patch number below this line */
731+
/**/
732+
833,
731733
/**/
732734
832,
733735
/**/

0 commit comments

Comments
 (0)