csw deletes existing whitespace that surrounds a word

Christoph LANGE langec at web.de
Wed Oct 19 17:09:54 CEST 2011


Dear all,

here is a bug report for evil and evil-surround in their (hopefully!) 
latest versions:

evil:

commit 786bc73908bc7d9c8e998c9d719ee6ecf3475e15
Author: Vegard Øye <vegard_oye at hotmail.com>
Date:   Wed Oct 19 14:24:19 2011 +0200

evil-surround:

commit d911f1eb70aa1071ae0f2bcce60cd9369a43d556
Merge: e4e592e c43dfec
Author: Tim Harper <timcharper at gmail.com>
Date:   Mon Sep 5 08:35:54 2011 -0700

I have the following text, where <> denotes the cursor position:

> Here is an e<x>ample:

I would like to surround the word "example" with "*", so I enter (in 
normal mode) "csw*".

Result in vim:

> Here is an <*>example*:

Result in evil with evil-surround:

> Here is an<*>example*:

Interestingly, the space before "example" is already deleted after 
entering "csw", i.e. while evil still waits for me to enter the "*".

When there is a whitespace after the word to be surrounded, it's _that_ 
whitespace that is lost.  For example,

> Here is an e<x>ample for something:

turns into

> Here is an <*>example*for something:

Cheers, and thanks in advance,

Christoph

-- 
Christoph Lange, http://www.facebook.com/ch.lange, Skype duke4701



More information about the implementations-list mailing list