git-gutter:statistic also show the modified status
kguidonimartins opened this issue · 2 comments
kguidonimartins commented
Hi, thanks for this minor mode. It is really very useful.
Is there a way for the git-gutter:statistic to show the buffer's modified status instead of just the added and deleted lines?
jcs090218 commented
Isn't the combination of added and deleted lines equal modified lines? 😕
kguidonimartins commented
Well, I'm not entirely sure. I think the example of diff
below could result in the following statistic: 5 added lines, 1 modified line, and 1 deleted line. Something like (+5 . ~1 . -1).
@@ -253,18 +282,23 @@ static int updategeom(void);
static void updatenumlockmask(void);
static void updatesizehints(Client *c);
-static void updatestatus(void);
static void updatesystray(void);
static void updatesystrayicongeom(Client *i, int w, int h);
static void updatesystrayiconstate(Client *i, XPropertyEvent *ev);
static void updatetitle(Client *c);
@@ -470,7 +505,7 @@ buttonpress(XEvent *e)
arg.ui = 1 << i;
} else if (ev->x < x + blw)
click = ClkLtSymbol;
- else if (ev->x > selmon->ww - (int)TEXTW(stext))
+ else if (ev->x > selmon->ww - (int)TEXTW(stext) - getsystraywidth())
click = ClkStatusText;
else
click = ClkWinTitle;
@@ -736,6 +824,11 @@ destroynotify(XEvent *e)
if ((c = wintoclient(ev->window)))
unmanage(c, 1);
+ else if ((c = wintosystrayicon(ev->window))) {
+ removesystrayicon(c);
+ resizebarwin(selmon);
+ updatesystray();
+ }
}