emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 210bb30 174/495: go-coverage: only update max-coun


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 210bb30 174/495: go-coverage: only update max-count if it's a count for the file we're interested in
Date: Sat, 7 Aug 2021 09:05:07 -0400 (EDT)

branch: elpa/go-mode
commit 210bb302ac24ceb0bdaa5ba8ef7f8f2424629e08
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    go-coverage: only update max-count if it's a count for the file we're 
interested in
---
 go-mode.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 94a965f..8509201 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1083,19 +1083,18 @@ for."
               (start-line start-column end-line end-column num count)
               (mapcar 'string-to-number rest)
 
-            (if (> count max-count)
-                (setq max-count count))
-
-            (if (and (string= (file-name-nondirectory file) file-name))
-                (push
-                 (make-go--covered
-                  :start-line start-line
-                  :start-column start-column
-                  :end-line end-line
-                  :end-column end-column
-                  :covered (/= count 0)
-                  :count count)
-                 ranges)))
+            (when (and (string= (file-name-nondirectory file) file-name))
+              (if (> count max-count)
+                  (setq max-count count))
+              (push
+               (make-go--covered
+                :start-line start-line
+                :start-column start-column
+                :end-line end-line
+                :end-column end-column
+                :covered (/= count 0)
+                :count count)
+               ranges)))
 
           (forward-line)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]