patch 8.2.1751: using 2 where bool is expected may throw an error
Problem: Using 2 where bool is expected may throw an error.
Solution: Make this backwards compatible.
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index ca06c34..e39458f 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -290,6 +290,9 @@
new
call setline(1, ['other code', 'here [', ' [', ' " cursor here', ' ]]'])
+ " should not give an error for using "42"
+ call assert_equal(0, searchpair('a', 'b', 'c', '', 42))
+
4
call assert_equal(3, searchpair('\[', '', ']', 'bW'))
call assert_equal([0, 3, 2, 0], getpos('.'))
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim
index 87d1e35..64310f6 100644
--- a/src/testdir/test_terminal2.vim
+++ b/src/testdir/test_terminal2.vim
@@ -560,8 +560,8 @@
endif
endif
- call assert_fails('call term_gettty(buf, 2)', 'E1023:')
- call assert_fails('call term_gettty(buf, -1)', 'E1023:')
+ call assert_fails('call term_gettty(buf, 2)', 'E475:')
+ call assert_fails('call term_gettty(buf, -1)', 'E475:')
call assert_equal('', term_gettty(buf + 1))