diff src/testdir/test_search.vim @ 25911:d6d31972c76d v8.2.3489

patch 8.2.3489: ml_get error after search with range Commit: https://github.com/vim/vim/commit/35a319b77f897744eec1155b736e9372c9c5575f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 9 13:58:55 2021 +0100 patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Oct 2021 15:00:03 +0200
parents b4d009c477a4
children 6f43253463cc
line wrap: on
line diff
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1989,5 +1989,19 @@ func Test_no_last_search_pattern()
   call feedkeys("??\<C-T>", 'xt')
 endfunc
 
+func Test_search_with_invalid_range()
+  new
+  let lines =<< trim END
+    /\%.v
+    5/
+    c
+  END
+  call writefile(lines, 'Xrangesearch')
+  source Xrangesearch
+
+  bwipe!
+  call delete('Xrangesearch')
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab