On Do, 31 Okt 2019, Bram Moolenaar wrote:

> + func Test_sub_beyond_end()
> +   new
> +   call setline(1, '#')
> +   let @/ = '^#\n\zs'
> +   s///e
> +   call assert_equal('#', getline(1))
> +   bwipe!
> + endfunc

Did this test fail before 8.1.2236? I tried the same, but
for some reason I couldn't get it to fail, unless I gave the substitute 
command on the command line. I then tried to simplify the test like 
this:

diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
index 8a8e7ab4f..24158b186 100644
--- a/src/testdir/test_substitute.vim
+++ b/src/testdir/test_substitute.vim
@@ -716,3 +716,10 @@ one two

   close!
 endfunc
+
+func Test_substitute_endofline()
+  new
+  "call assert_fails(':s/\n\zs//', 'E486')
+  :s/\n\zs//
+  bw!
+endfunc


Which works now, but before 8.1.2236 it hangs, because the ml_get_error 
requires to press enter a few times.

Tried the assert_fails(), but that does not throw E486 now, so the test 
now fails. Anyhow, I was just curious. I guess nothing to be done here.

Mit freundlichen Grüßen
Christian
-- 
"Weißt du, was ich an Euch Emanzen so bewundere?"
Emanze: "Keine Ahnung"
"Euer Selbstbewußtsein. Das gleicht die meisten anderen Nachteile wieder aus."

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20191031090512.GK24930%40256bit.org.

Raspunde prin e-mail lui