From 98b3dc0571603f07f3e81babe402bb0837fc619b Mon Sep 17 00:00:00 2001 From: Michael Reed Date: Mon, 27 Apr 2015 22:08:14 -0400 Subject: vim-patch:7.4.659 + test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/functional/ui/screen_basic_spec.lua | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 7710918b94..d57c1773b1 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -159,8 +159,6 @@ describe('Screen', function() | ]]) end) - - end) end) @@ -245,6 +243,32 @@ describe('Screen', function() 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('i0123456789kllj') + execute('set ruler') + feed('k') + screen:expect([[ + 0123^456 | + 789 | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + :set ruler 1,5 All | + ]]) + end) + end) + describe('command mode', function() it('typing commands', function() feed(':ls') -- cgit