diff --git a/ranger/config/commands.py b/ranger/config/commands.py index d2a0200..66bdc34 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -2,6 +2,8 @@ import os from ranger.core.loader import CommandLoader from ranger.api.commands import Command from ranger.gui.widgets import Widget +from ranger.gui.widgets.browsercolumn import BrowserColumn + Widget.vcsstatus_symb = { 'conflict': ( @@ -24,6 +26,7 @@ Widget.vcsstatus_symb = { '! ', ['vcsunknown']), } + Widget.vcsremotestatus_symb = { 'diverged': ( ' Y', ['vcsdiverged']), @@ -39,6 +42,19 @@ Widget.vcsremotestatus_symb = { ' !', ['vcsunknown']), } + +def wrap_draw_vcsstring_display(origin): + def _draw_vcsstring_display(*args, **kwargs): + vcsstring = origin(*args, **kwargs) + if vcsstring and vcsstring[0] and vcsstring[0][0] == ' ': + vcsstring[0][0] = ' ' + return vcsstring + return _draw_vcsstring_display + + +BrowserColumn._draw_vcsstring_display = wrap_draw_vcsstring_display(BrowserColumn._draw_vcsstring_display) + + class extracthere(Command): def execute(self): """ Extract copied files to current directory """