Mercurial > vim
comparison src/edit.c @ 4162:b97109760603 v7.3.833
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 26 Feb 2013 13:30:32 +0100 |
parents | 4e6e012af150 |
children | 14cdb6e4d5b8 |
comparison
equal
deleted
inserted
replaced
4161:820edca36cf9 | 4162:b97109760603 |
---|---|
9137 int did_scroll = FALSE; | 9137 int did_scroll = FALSE; |
9138 # endif | 9138 # endif |
9139 | 9139 |
9140 tpos = curwin->w_cursor; | 9140 tpos = curwin->w_cursor; |
9141 | 9141 |
9142 # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) | 9142 # ifdef FEAT_WINDOWS |
9143 /* Currently the mouse coordinates are only known in the GUI. */ | 9143 if (mouse_row >= 0 && mouse_col >= 0) |
9144 if (gui.in_use && mouse_row >= 0 && mouse_col >= 0) | |
9145 { | 9144 { |
9146 int row, col; | 9145 int row, col; |
9147 | 9146 |
9148 row = mouse_row; | 9147 row = mouse_row; |
9149 col = mouse_col; | 9148 col = mouse_col; |
9189 # ifdef FEAT_INS_EXPAND | 9188 # ifdef FEAT_INS_EXPAND |
9190 did_scroll = TRUE; | 9189 did_scroll = TRUE; |
9191 # endif | 9190 # endif |
9192 } | 9191 } |
9193 | 9192 |
9194 # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) | 9193 # ifdef FEAT_WINDOWS |
9195 curwin->w_redr_status = TRUE; | 9194 curwin->w_redr_status = TRUE; |
9196 | 9195 |
9197 curwin = old_curwin; | 9196 curwin = old_curwin; |
9198 curbuf = curwin->w_buffer; | 9197 curbuf = curwin->w_buffer; |
9199 # endif | 9198 # endif |