From 27018ca2b1f0ae4322ce3648b81b76adfe385c7d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 28 Sep 2010 23:01:13 +0200 Subject: vim_mode: Add UTF-8 support for ~. --- vim-mode/vim_mode.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 085ea78..d44452c 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -676,7 +676,7 @@ sub cmd_movement_tilde { my $input = _input(); my $string = substr $input, $pos, $count; - $string =~ tr/a-zA-Z/A-Za-z/; + $string =~ s/(.)/(uc($1) eq $1) ? lc($1) : uc($1)/ge; substr $input, $pos, $count, $string; _input($input); -- cgit v1.2.3