From 994b081aac309954a7984929329fbcd5c5cf8883 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 10 Dec 2019 21:20:54 +0100 Subject: issue #7412: HTML: Opening a reference link in a new tab does not scroll to the content --- src/htmlgen.cpp | 9 ++------- src/scanner.l | 7 +++++-- templates/html/resize.js | 1 + 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index df39d32..19a1869 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -300,12 +300,7 @@ static QCString substituteHtmlKeywords(const QCString &s, treeViewCssJs = "\n" "\n" "\n" - "\n" - ""; + "\n"; } if (searchEngine) @@ -2372,7 +2367,7 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa "$(document).ready(function(){initNavTree('") + QCString(name) + Doxygen::htmlFileExtension + QCString("','") + relpath + - QCString("');});\n" + QCString("'); initResizable(); });\n" "/* @license-end */\n" "\n" "
\n"); diff --git a/src/scanner.l b/src/scanner.l index 0e3aeb0..7115129 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1941,6 +1941,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } \n { + lineCount(yyscanner); *yyextra->pCopyHereDocGString += yytext; } {ID} { @@ -7186,10 +7187,12 @@ static void parseMain(yyscan_t yyscanner, //depthIf = 0; yyextra->protection = Public; yyextra->mtype = Method; - yyextra->stat = FALSE; + yyextra->stat = FALSE; yyextra->virt = Normal; yyextra->current_root = rt; - yyextra->yyLineNr= 1 ; + yyextra->yyLineNr = 1 ; + yyextra->yyBegLineNr = 1; + yyextra->yyBegColNr = 0; yyextra->yyFileName = fileName; setContext(yyscanner); bool processWithClang = yyextra->insideCpp || yyextra->insideObjC; diff --git a/templates/html/resize.js b/templates/html/resize.js index f5291d9..a0bb5f4 100644 --- a/templates/html/resize.js +++ b/templates/html/resize.js @@ -91,6 +91,7 @@ function initResizable() } collapsedWidth=width; } + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); } function collapseExpand() -- cgit v0.12