mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:7.4.659 + test
Problem: When 'ruler' is set the preferred column is reset. (Issue 339) Solution: Don't set curswant when redrawing the status lines. https://code.google.com/p/vim/source/detail?r=v7-4-659 Helped-by: David Bürgin <676c7473@gmail.com> Based on #2347 by @pvinis
This commit is contained in:
parent
28e60462c8
commit
98b3dc0571
@ -4347,7 +4347,7 @@ did_set_string_option (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (curwin->w_curswant != MAXCOL
|
if (curwin->w_curswant != MAXCOL
|
||||||
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
|
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
|
||||||
curwin->w_set_curswant = TRUE;
|
curwin->w_set_curswant = TRUE;
|
||||||
|
|
||||||
check_redraw(options[opt_idx].flags);
|
check_redraw(options[opt_idx].flags);
|
||||||
@ -4988,7 +4988,7 @@ set_bool_option (
|
|||||||
|
|
||||||
comp_col(); /* in case 'ruler' or 'showcmd' changed */
|
comp_col(); /* in case 'ruler' or 'showcmd' changed */
|
||||||
if (curwin->w_curswant != MAXCOL
|
if (curwin->w_curswant != MAXCOL
|
||||||
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
|
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
|
||||||
curwin->w_set_curswant = TRUE;
|
curwin->w_set_curswant = TRUE;
|
||||||
check_redraw(options[opt_idx].flags);
|
check_redraw(options[opt_idx].flags);
|
||||||
|
|
||||||
@ -5360,7 +5360,7 @@ set_num_option (
|
|||||||
|
|
||||||
comp_col(); /* in case 'columns' or 'ls' changed */
|
comp_col(); /* in case 'columns' or 'ls' changed */
|
||||||
if (curwin->w_curswant != MAXCOL
|
if (curwin->w_curswant != MAXCOL
|
||||||
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
|
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
|
||||||
curwin->w_set_curswant = TRUE;
|
curwin->w_set_curswant = TRUE;
|
||||||
check_redraw(options[opt_idx].flags);
|
check_redraw(options[opt_idx].flags);
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ static int included_patches[] = {
|
|||||||
//662,
|
//662,
|
||||||
//661,
|
//661,
|
||||||
660,
|
660,
|
||||||
//659,
|
659,
|
||||||
//658,
|
//658,
|
||||||
//657,
|
//657,
|
||||||
//656,
|
//656,
|
||||||
|
@ -159,8 +159,6 @@ describe('Screen', function()
|
|||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -245,6 +243,32 @@ describe('Screen', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe('normal mode', function()
|
||||||
|
-- https://code.google.com/p/vim/issues/detail?id=339
|
||||||
|
it("setting 'ruler' doesn't reset the preferred column", function()
|
||||||
|
execute('set virtualedit=')
|
||||||
|
feed('i0123456<cr>789<esc>kllj')
|
||||||
|
execute('set ruler')
|
||||||
|
feed('k')
|
||||||
|
screen:expect([[
|
||||||
|
0123^456 |
|
||||||
|
789 |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
:set ruler 1,5 All |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
describe('command mode', function()
|
describe('command mode', function()
|
||||||
it('typing commands', function()
|
it('typing commands', function()
|
||||||
feed(':ls')
|
feed(':ls')
|
||||||
|
Loading…
Reference in New Issue
Block a user