patch 8.1.1731: command line history not read from viminfo on startup
Problem: Command line history not read from viminfo on startup.
Solution: Get history length after initializing it.
diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim
index cea78e5..8206458 100644
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -1,6 +1,12 @@
" Test for reading and writing .viminfo
function Test_viminfo_read_and_write()
+ " First clear 'history', so that "hislen" is zero. Then set it again,
+ " simulating Vim starting up.
+ set history=0
+ wviminfo Xviminfo
+ set history=1000
+
call histdel(':')
let lines = [
\ '# comment line',