diff options
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | coverage/htmlfiles/coverage_html.js | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 57192db2..63b0125f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -34,6 +34,10 @@ Unreleased - Coverage will no longer generate "Already imported a file that will be measured" warnings about coverage itself (`issue 905`_). +- The HTML report uses j/k to move up and down among the highlighted chunks of + code. They used to highlight the current chunk, but 5.0 broke that behavior. + Now the highlighting is working again. + - The JSON report now includes ``percent_covered_display``, a string with the total percentage, rounded to the same number of decimal places as the other reports' totals. diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index 27b49b36..c2151d34 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -311,11 +311,6 @@ coverage.line_elt = function (n) { return $("#t" + n); }; -// Return the nth line number div. -coverage.num_elt = function (n) { - return $("#n" + n); -}; - // Set the selection. b and e are line numbers. coverage.set_sel = function (b, e) { // The first line selected. @@ -514,9 +509,9 @@ coverage.show_selection = function () { var c = coverage; // Highlight the lines in the chunk - $(".linenos .highlight").removeClass("highlight"); + $("#source .highlight").removeClass("highlight"); for (var probe = c.sel_begin; probe > 0 && probe < c.sel_end; probe++) { - c.num_elt(probe).addClass("highlight"); + c.line_elt(probe).addClass("highlight"); } c.scroll_to_selection(); |