chiark / gitweb /
documentation: properly show 100+ when having more results that can fit.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 18 Jul 2019 11:30:59 +0000 (13:30 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 18 Jul 2019 15:41:49 +0000 (17:41 +0200)
This got accidentally broken in 8bdb844ceb547d8ca3156ef815de9603e51a598a
when implementing the Tab autocompletion. Unfortunately I can't really
auto-test the UI code :/

documentation/search.js

index 0ebbf44f639013ac69f5ce9f1993f345d82c5baf..d1a938784c81ee25b04f4166b0078b998086e563 100644 (file)
@@ -555,7 +555,7 @@ var Search = {
         this.renderResults(value, results);
         if(value.trim().length) {
             document.getElementById('search-symbolcount').innerHTML =
-                results[0].length + (results.length >= this.maxResults ? '+' : '') + " results (" + Math.round((after - prev)*10)/10 + " ms)";
+                results[0].length + (results[0].length >= this.maxResults ? '+' : '') + " results (" + Math.round((after - prev)*10)/10 + " ms)";
         } else
             document.getElementById('search-symbolcount').innerHTML = this.symbolCount;
     },