ZyX_I avatar ZyX_I committed 00a9887

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

Comments (0)

Files changed (1)

-
 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.