Am 23.03.2010 16:27, schrieb Bram Moolenaar:

Patch 7.2.407
Problem:    When using an expression in ":s" backslashes in the result are
            dropped. (Sergey Goldgaber, Christian Brabandt)
Solution:   Double backslashes.
Files:      src/regexp.c

I found a bug (two lines of text below):

abc\
def

    :s/abc\\\ndef/\=submatch(0)/
    " result:

ab...@def

(^@ is one character)


BTW: How do you now insert a literal <CR> or a literal <NL>?

E.g. this worked before:
    :s/.*/\="abc\\\<CR>def"/

(or :s/.*/\="abc\\\rdef"/
 or :s/.*/\='abc\^Mdef'/    where ^M was inserted with <C-V><CR>)

It now breaks the line.


What about backwards compatibility?

I had a script dealing with conversion of binary data, it's (most
probably) broken now.

I also see updates for other scripts due to this patch, e.g.
Vimscript #162, auctex.vim, v2.2.1 -> v2.2.2


--
Andy

--
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

Raspunde prin e-mail lui