Going against what I thought it was, the problem was the hyperref package. As this other post here hinted, the include's order was bogus, but also I had to add a \phantomsection
.
So, my preamble was
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% color
\usepackage[table,dvipsnames]{xcolor}
% Blue links
\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref}
% "Natbib" style for references
\usepackage[backend=biber,bibencoding=utf8,style=numeric-comp]{biblatex}
% \makeglossaries
% http://en.wikibooks.org/wiki/LaTeX/Glossary#Using_defined_terms
\usepackage[xindy,toc]{glossaries}
% http://texblog.org/tag/addcontentsline/
\usepackage[numbib]{tocbibind}
% \newminted{cpp}
% [chapter] to number by chapter
\usepackage[chapter]{minted}
% TODO anotations
\usepackage[colorinlistoftodos,portuguese]{todonotes}
\usepackage{float}
\usepackage{caption} % \begin{caption}
\usepackage{csquotes} % required by {babel}
\usepackage{graphicx} % \includegraphics
\usepackage{subcaption} % \begin{subfigure}
\usepackage{verbatim} % \begin{comment}
\usepackage{fullpage} % thinner margins
\usepackage{indentfirst} % indent 1st paragraphs
\usepackage{setspace} % \setstretch
\usepackage{afterpage} % \afterpage https://tex.stackexchange.com/q/88657
% turning 'fi' ligatures off
% http://www.latex-community.org/forum/viewtopic.php?f=5&t=953#p13896
\usepackage{microtype}
\DisableLigatures{encoding = *, family = *}
Changing the include's order, turned into
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% color
\usepackage[table,dvipsnames]{xcolor}
\usepackage{caption} % \begin{caption}
\usepackage{csquotes} % required by {babel}
\usepackage{graphicx} % \includegraphics
\usepackage{subcaption} % \begin{subfigure}
\usepackage{verbatim} % \begin{comment}
\usepackage{fullpage} % thinner margins
\usepackage{indentfirst} % indent 1st paragraphs
\usepackage{setspace} % \setstretch
\usepackage{afterpage} % \afterpage https://tex.stackexchange.com/q/88657
% \newminted{cpp}
% [chapter] to number by chapter
\usepackage[chapter]{minted}
% Blue links
\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref}
% turning 'fi' ligatures off
% http://www.latex-community.org/forum/viewtopic.php?f=5&t=953#p13896
\usepackage{microtype}
\DisableLigatures{encoding = *, family = *}
% "Natbib" style for references
\usepackage[backend=biber,bibencoding=utf8,style=numeric-comp]{biblatex}
% \makeglossaries
% http://en.wikibooks.org/wiki/LaTeX/Glossary#Using_defined_terms
\usepackage[xindy,toc]{glossaries}
% http://texblog.org/tag/addcontentsline/
\usepackage[numbib]{tocbibind}
% TODO anotations
\usepackage[colorinlistoftodos,portuguese]{todonotes}
and the renew command for \listoflistings
with the \phantomsection
% https://tex.stackexchange.com/a/99656/5125
\renewcommand{\listoflistings}{%
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\listoflistingscaption}%
\listof{listing}{\listoflistingscaption}%
}
Now, clicking the list of listings entry on table of contents guides to the right page of the listing.