summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-12-05 20:08:37 +0100
committerhut <hut@hut.pm>2017-10-15 18:17:01 +0200
commit7d597e21e50e9beaa94536cfd88bd6cc5a790a7e (patch)
tree5fa501b7b4c1f05ef9e2de13b307ea6febdc79b9
parentd9798f80aac020232d97bdd04a18fb79ca4156fa (diff)
downloadranger-7d597e21e50e9beaa94536cfd88bd6cc5a790a7e.tar.gz
Add ranger.gui.widgets.browsercolumn.hook_before_drawing
-rw-r--r--ranger/gui/widgets/browsercolumn.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 14fde110..485f4fc8 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -17,6 +17,10 @@ from . import Widget
 from .pager import Pager
 
 
+def hook_before_drawing(fsobject, color_list):
+    return fsobject, color_list
+
+
 class BrowserColumn(Pager):  # pylint: disable=too-many-instance-attributes
     main_column = False
     display_infostring = False
@@ -382,6 +386,8 @@ class BrowserColumn(Pager):  # pylint: disable=too-many-instance-attributes
             display_data = []
             drawn.display_data[key] = display_data
 
+            drawn, this_color = hook_before_drawing(drawn, this_color)
+
             predisplay = predisplay_left + predisplay_right
             for txt, color in predisplay:
                 attr = self.settings.colorscheme.get_attr(*(this_color + color))
tring.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
" when opening files in this directory, load vimrc from cwd (top-level)
source vimrc.vim