summaryrefslogtreecommitdiff
path: root/src/testdir/test_number.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-07 14:26:59 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-07 14:26:59 +0200
commitec572ad6a6cb0d4e71901951a70a4f038d48cb17 (patch)
treea91b2770fd2afb1981c2baf30af7af5372a5a42e /src/testdir/test_number.vim
parent6cc7e21412487ff8bd531c73ac9325f5ba2409a9 (diff)
downloadvim-git-ec572ad6a6cb0d4e71901951a70a4f038d48cb17.tar.gz
patch 8.1.1642: may use uninitialized variablev8.1.1642
Problem: May use uninitialized variable. (Patrick Palka) Solution: Initialize variables earlier. (closes #4623)
Diffstat (limited to 'src/testdir/test_number.vim')
-rw-r--r--src/testdir/test_number.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_number.vim b/src/testdir/test_number.vim
index 415aefc85..81326bce1 100644
--- a/src/testdir/test_number.vim
+++ b/src/testdir/test_number.vim
@@ -252,3 +252,14 @@ func Test_numberwidth_adjusted()
call s:compare_lines(expect, lines)
call s:close_windows()
endfunc
+
+" This was causing a memcheck error
+func Test_relativenumber_uninitialised()
+ new
+ set rnu
+ call setline(1, ["a", "b"])
+ redraw
+ call feedkeys("j", 'xt')
+ redraw
+ bwipe!
+endfunc