-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Vim: 8.0
OS: Linux (Arch)
eregex: 950027d
Messages created with echom(sg) aren't displayed correctly or saved to the message history when using :%S/<pattern>/\=<expression>/.
echom-vimrc
call plug#begin()
Plug 'othree/eregex.vim'
call plug#end()
set nocompatible
" echo the supplied arg and return it unchanged
function! Echo(arg)
echomsg 'arg: ' . a:arg
return a:arg
endfunctionsteps to reproduce
native (:substitute)
- open a file with
vim -u echom-vimrc test.txt - insert the word "foo", and replace it with:
:%s/foo/\=Echo('bar')/ - undo the change, then re-run the substitution
- the message ("arg: foo") is displayed after each substitution, and appears twice in the output of
:messages
eregex (:S)
- open a file with
vim -u echom-vimrc test.txt - insert the word "foo", and replace it with:
:%S/foo/\=Echo('bar')/ - undo the change, then re-run the substitution
- the message ("arg: foo") is only displayed after the first substitution, and doesn't appear at all in the output of
:messages
Metadata
Metadata
Assignees
Labels
No labels