Bug: surround-read-tag matches wrong tag when there is mixed content
Dear evil-surround developers, I think I found a bug in surround-read-tag; well, I think that's the movement function that is bound to the key sequence "st". I'm using the latest versions of evil and of evil-surround. First a simple example that works; "|" indicates the cursor position. <simple>te|xt</simple> cstt and then "foo" RET results, as expected, in |<foo>text</foo> In mixed XML content, i.e. elements that contain elements as well as plain text, it doesn't work. Example 1: Given: <outer><inner>te|xt</inner> other text</outer> Input: cstt and then "foo" RET Expected: <outer>|<foo>text</foo> other text</outer> Actually: <outer><foo><inner>text</inner></foo></outer> and you see that the first press of the "t" key already deletes the "other text". Example 2: Given: <outer><inner>text</inner> other |text</outer> Input: cstt and then "foo" RET (same as example 1) Expected: |<foo><inner>text</inner> other text</outer> Actually: <outer><foo><inner>text</inner></foo></outer> (same as example 1) Cheers, Christoph -- Christoph Lange, http://www.facebook.com/ch.lange, Skype duke4701
On 2011-11-21 17:41 +0100, Christoph LANGE wrote:
I think I found a bug in surround-read-tag; well, I think that's the movement function that is bound to the key sequence "st". I'm using the latest versions of evil and of evil-surround.
Confirmed, but the bug is in Evil and not in evil-surround. I'll push an update soon. -- Vegard
participants (2)
-
Christoph LANGE -
Vegard Øye