diff options
Diffstat (limited to 'test/functional/legacy/normal_spec.lua')
-rw-r--r-- | test/functional/legacy/normal_spec.lua | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/functional/legacy/normal_spec.lua b/test/functional/legacy/normal_spec.lua index 5158ca3009..1ae22a83bd 100644 --- a/test/functional/legacy/normal_spec.lua +++ b/test/functional/legacy/normal_spec.lua @@ -15,7 +15,6 @@ describe('normal', function() before_each(function() clear() screen = Screen.new(40, 19) - screen:attach() end) -- oldtest: Test_normal_j_below_botline() @@ -103,4 +102,33 @@ describe('normal', function() ]], }) end) + + -- oldtest: Test_normal_gm() + it('gm sets curswant correctly', function() + screen:try_resize(75, 10) + exec([[ + call setline(1, repeat([" abcd\tefgh\tij"], 10)) + call cursor(1, 1) + ]]) + feed('jVjzf') + -- gm + feed('gmk') + eq(18, fn.virtcol('.')) + -- g0 + feed('gj0k') + eq(1, fn.virtcol('.')) + -- g^ + feed('jg^k') + eq(3, fn.virtcol('.')) + exec('call cursor(10, 1)') + -- gm + feed('gmk') + eq(18, fn.virtcol('.')) + -- g0 + feed('gj0k') + eq(1, fn.virtcol('.')) + -- g^ + feed('jg^k') + eq(3, fn.virtcol('.')) + end) end) |