Commits

ZyX_I committed 00a9887

@%aurum/drivers/mercurial: Fixed ansi_esc_echo support
Ref #42

  • Participants
  • Parent commits 438f71c
  • Tags release-1.5

Comments (0)

Files changed (1)

File python/aurum.py

-
 from mercurial import hg, ui, commands, match
 from mercurial.repo import error
 import vim
 if hasattr(vim, 'bindeval'):
     ansi_esc_echo_func=None
     def register_ansi_esc_echo_func(func):
+        global ansi_esc_echo_func
         ansi_esc_echo_func=func
-        global echoe
-        echoe=ansi_esc_echo
+        global echom
+        echom=ansi_esc_echo
 
     def ansi_esc_echo(o, colinfo):
         if colinfo is None:
-            return ansi_esc_echo_func(str(o))
+            return ansi_esc_echo_func(str(o), self={})
         else:
-            return ansi_esc_echo_func(str(o), colinfo)
+            return ansi_esc_echo_func(str(o), colinfo, self={})
 
 echoe=lambda o, colinfo: pyecho(o, True )
 echom=lambda o, colinfo: pyecho(o, False)