In the following tikz matrix of nodes, the red line isn't drawn on the (magic-2-2) node. How could I make it continuous from (magic-1-1) to (magic-3-3) nodes, drawn through the (“step” on) node (magic-2-2)?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary {matrix}
\begin{document}
\begin{tikzpicture}
\matrix (magic) [matrix of nodes]
{
1-1 & 1-2 & 1-3 \
2-1 & 2-2 & 2-3 \
3-1 & 3-2 & 3-3 \
};
\draw[red,->] (magic-1-1) |- (magic-2-2) -| (magic-3-3);
\end{tikzpicture}
\end{document}



(magic-2-2)by(magic-2-2.center)? – Qrrbrbirlbel May 14 '23 at 14:31