I'm seeing some odd behaviour when passing a submatch to substitute() when evaluating a regexp in GVim 7.2. Say I have the following two- line file:
the second line appears below If I place the cursor at the start of the file and execute the following substitution: :s/\v(the\s)(\_.*)/\=submatch(1) . submatch(2) then it works correctly and I see: the second line appears below However, if I instead execute the following substitution on the same pattern: s/\v(the\s)(\_.*)/\=substitute(submatch(1),'the','no','') . submatch (2) then I see only the following line: no second line In both of these examples, the second submatch spans both lines. But in the second example, after calling substitute() with the first match, the second match retains only the text that appears on the first line. Is this a bug? --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---