branch: elpa/flycheck
commit 4615773d7e1b4b7aae409867671885356ab74b49
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Strictly enforce flycheck-navigation-minimum-level
    
    Remove the fallback that included lower-severity errors in navigation
    when no errors at the minimum level existed.  Previously, setting the
    minimum level to 'warning' would still navigate to 'info' errors if
    no warnings were present, which was confusing.
    
    Fixes #1856
---
 flycheck.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/flycheck.el b/flycheck.el
index 43a105ad00..2e3de9e437 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -4962,15 +4962,11 @@ overlays."
   (flycheck-error-level-interesting-p (get-char-property pos 'flycheck-error)))
 
 (defun flycheck-error-level-interesting-p (err)
-  "Check if ERR severity is >= `flycheck-navigation-minimum-level'.
-
-ERR is also interesting (the function returns true) if there are
-no errors as or more severe than `flycheck-navigation-minimum-level'."
+  "Check if ERR severity is >= `flycheck-navigation-minimum-level'."
   (when (flycheck-error-p err)
     (if-let (min-level flycheck-navigation-minimum-level)
-        (or (<= (flycheck-error-level-severity min-level)
-                (flycheck-error-level-severity (flycheck-error-level err)))
-            (not (flycheck-has-current-errors-p min-level)))
+        (<= (flycheck-error-level-severity min-level)
+            (flycheck-error-level-severity (flycheck-error-level err)))
       t)))
 
 (defun flycheck-next-error-pos (n &optional reset)

Reply via email to