summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2016-03-29 17:42:02 +0200
committerIngo Molnar <mingo@kernel.org>2016-03-31 13:35:09 +0200
commitc109bf95992b391bb40bc37c5d309d13fead99b5 (patch)
treec6a67c2c137ccb47ca806e914eeb5defb8a25363 /drivers/irqchip
parent054efb6467f84490bdf92afab6d9dbd5102e620a (diff)
x86/cpufeature: Remove cpu_has_pge
Use static_cpu_has() in __flush_tlb_all() due to the time-sensitivity of this one. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1459266123-21878-10-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/irqchip')
0 files changed, 0 insertions, 0 deletions
ef='/vim/diff/src/testdir/test_functions.vim?h=v9.0.0576&id=031a745608d615d56f9d79bb0f76e2a74b2eaf14'>src/testdir/test_functions.vim67
-rw-r--r--src/version.c2
4 files changed, 87 insertions, 10 deletions
diff --git a/src/mouse.c b/src/mouse.c
index 247c6df8e2..4e10e723ed 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -3029,16 +3029,22 @@ mouse_comp_pos(
if (win->w_skipcol > 0 && lnum == win->w_topline)
{
- // Adjust for 'smoothscroll' clipping the top screen lines.
- // A similar formula is used in curs_columns().
int width1 = win->w_width - win_col_off(win);
- int skip_lines = 0;
- if (win->w_skipcol > width1)
- skip_lines = (win->w_skipcol - width1)
+
+ if (width1 > 0)
+ {
+ int skip_lines = 0;
+
+ // Adjust for 'smoothscroll' clipping the top screen lines.
+ // A similar formula is used in curs_columns().
+ if (win->w_skipcol > width1)
+ skip_lines = (win->w_skipcol - width1)
/ (width1 + win_col_off2(win)) + 1;
- else if (win->w_skipcol > 0)
- skip_lines = 1;
- count -= skip_lines;
+ else if (win->w_skipcol > 0)
+ skip_lines = 1;
+
+ count -= skip_lines;
+ }
}
if (count > row)
diff --git a/src/move.c b/src/move.c
index 6790192ab5..797184812a 100644
--- a/src/move.c
+++ b/src/move.c
@@ -2617,12 +2617,14 @@ scroll_cursor_bot(int min_scroll, int set_topbot)
plines_win
#endif
(curwin, curwin->w_topline, FALSE);
- int skip_lines = 0;
int width1 = curwin->w_width - curwin_col_off();
+
if (width1 > 0)
{
int width2 = width1 + curwin_col_off2();
- // similar formula is used in curs_columns()
+ int skip_lines = 0;
+
+ // A similar formula is used in curs_columns().
if (curwin->w_skipcol > width1)
skip_lines += (curwin->w_skipcol - width1) / width2 + 1;
else if (curwin->w_skipcol > 0)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index f0d7385825..5adbb42e65 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -3697,6 +3697,73 @@ func Test_getmousepos()
\ column: 8,
\ coladd: 21,
\ }, getmousepos())
+
+ 30vnew
+ setlocal smoothscroll number
+ call setline(1, join(range(100)))
+ exe "normal! \<C-E>"
+ call test_setmouse(1, 5)
+ call assert_equal(#{
+ \ screenrow: 1,
+ \ screencol: 5,
+ \ winid: win_getid(),
+ \ winrow: 1,
+ \ wincol: 5,
+ \ line: 1,
+ \ column: 27,
+ \ coladd: 0,
+ \ }, getmousepos())
+ call test_setmouse(2, 5)
+ call assert_equal(#{
+ \ screenrow: 2,
+ \ screencol: 5,
+ \ winid: win_getid(),
+ \ winrow: 2,
+ \ wincol: 5,
+ \ line: 1,
+ \ column: 53,
+ \ coladd: 0,
+ \ }, getmousepos())
+
+ exe "normal! \<C-E>"
+ call test_setmouse(1, 5)
+ call assert_equal(#{
+ \ screenrow: 1,
+ \ screencol: 5,
+ \ winid: win_getid(),
+ \ winrow: 1,
+ \ wincol: 5,
+ \ line: 1,
+ \ column: 53,
+ \ coladd: 0,
+ \ }, getmousepos())
+ call test_setmouse(2, 5)
+ call assert_equal(#{
+ \ screenrow: 2,
+ \ screencol: 5,
+ \ winid: win_getid(),
+ \ winrow: 2,
+ \ wincol: 5,
+ \ line: 1,
+ \ column: 79,
+ \ coladd: 0,
+ \ }, getmousepos())
+
+ vert resize 4
+ call test_setmouse(2, 2)
+ " This used to crash Vim
+ call assert_equal(#{
+ \ screenrow: 2,
+ \ screencol: 2,
+ \ winid: win_getid(),
+ \ winrow: 2,
+ \ wincol: 2,
+ \ line: 1,
+ \ column: 53,
+ \ coladd: 0,
+ \ }, getmousepos())
+
+ bwipe!
bwipe!
endfunc
diff --git a/src/version.c b/src/version.c
index cbd29097d8..e601c82172 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 406,
+/**/
405,
/**/
404,