From 6fa0e7e77498198788d9fa22acc53145a8691db1 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 17:51:38 +0200 Subject: [PATCH] Fixup last commit prefAll return all the element in the reverse order, so we need to iterate in the right order --- data/codebrowser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/codebrowser.js b/data/codebrowser.js index 9bb284c..d59681c 100644 --- a/data/codebrowser.js +++ b/data/codebrowser.js @@ -550,7 +550,7 @@ $(function () { // Find the context: Look at up every line from the current one if // there is a .def, if this definition is a declaration, it is the context var prevLines = t.closest("tr").prevAll(); - for (var x = prevLines.length - 1; x >= 0; --x) { + for (var x = 0; x < prevLines.length; ++x) { var context = $(prevLines[x]).find(".def"); if (!context.length) continue;