Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-gutter:statistic also show the modified status #195

Open
kguidonimartins opened this issue Apr 22, 2021 · 2 comments
Open

git-gutter:statistic also show the modified status #195

kguidonimartins opened this issue Apr 22, 2021 · 2 comments
Labels
enhancement new feature requested

Comments

@kguidonimartins
Copy link

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
Copy link
Collaborator

Isn't the combination of added and deleted lines equal modified lines? 😕

@kguidonimartins
Copy link
Author

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();
+	}
 }

@gonewest818 gonewest818 added the enhancement new feature requested label Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature requested
Development

No branches or pull requests

3 participants