summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/api/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ranger/api/__init__.py b/ranger/api/__init__.py
index cc0815c2..67ff8bc4 100644
--- a/ranger/api/__init__.py
+++ b/ranger/api/__init__.py
@@ -29,8 +29,7 @@ def hook_ready(fm):
 
 from ranger.core.linemode import LinemodeBase
 
-def register_linemode(*linemodes):
-    """Register the linemodes in a dictionary of the available linemodes."""
+def custom_linemode(linemode_class):
     from ranger.container.fsobject import FileSystemObject
-    for linemode in linemodes:
-        FileSystemObject.linemode_dict[linemode.name] = linemode()
+    FileSystemObject.linemode_dict[linemode_class.name] = linemode_class()
+    return linemode_class