From 52c50db0e9cc2ec5293ef443df5b7ace47ddded8 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Thu, 24 Mar 2011 08:49:33 +0100 Subject: [PATCH] =?UTF-8?q?ork=20around=20for=20testing=20on=20windows.=20?= =?UTF-8?q?Some=20systems=20expect=20a=20second=20keystroke=20after=20`=20?= =?UTF-8?q?and=20=C2=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index edde2fa..825daf2 100755 --- a/test.py +++ b/test.py @@ -90,7 +90,13 @@ WIN_REPLACES = [ ("\t", "{TAB}"), ("\n", "~"), (ESC, "{ESC}"), - ] + + # On my system ` waits for a second keystroke, so `+SPACE = "`". On + # most systems, `+Space = "` ". I work around this, by sending the host + # ` as `+_+BS. Awkward, but the only way I found to get this working. + ("`", "`_{BS}"), + ("´", "´_{BS}"), +] def convert_keys(keys): keys = BRACES.sub(r"{\1}", keys) for k in WIN_ESCAPES: @@ -110,7 +116,6 @@ def send_win(keys, session): return SEQ_BUF = [] - seq_o = seq seq = convert_keys(seq) if not is_focused(): @@ -628,7 +633,7 @@ class PythonCodeOld_SimpleExample(_VimTest): snippets = ("test", """hi `!p res = "Hallo"` End""") keys = "test" + EX wanted = "hi Hallo End" -class PythonCodeOld_ReferencePlaceholder(_VimTest): +class PythonCodeOld_ReferencePlaceholderAfter(_VimTest): snippets = ("test", """${1:hi} `!p res = t[1]+".blah"` End""") keys = "test" + EX + "ho" wanted = "ho ho.blah End"