Linebreak in makeatletter command

For some reason I get a linebreak when using my \textlabel command in the table cell. It seems to work fine for everything else.

\documentclass[a4paper]{scrartcl}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[table]{xcolor}
\usepackage{nameref}

\begin{document}

\makeatletter
\newcommand*{\textlabel}[2]{%
\edef\@currentlabel{#1}% Set target label
\phantomsection% Correct hyper reference link
#1\label{#2}% Print and store label
}
\makeatother

\section{Section}
\paragraph*{\textlabel{Paragraph}{paragraph}}
\paragraph*{}
\begin{tabular}{lp{10cm}}
\hline
\textbf{Col 1} & \textbf{Col 2} \\ \hline
Bla1 & \textlabel{Blubb1}{reference1} \\
& Description1 \\
Bla2 & \textlabel{Blubb2}{reference2} \\
& Description2 \\ \hline
\end{tabular}
\end{document}

-

Avoid doing things in vertical mode, especially at the start of table cells.

\makeatletter
\newcommand*{\textlabel}[2]{%
\edef\@currentlabel{#1}% Set target label
\leavevmode\phantomsection% Correct hyper reference link
%%%%%%%%%%
#1\label{#2}% Print and store label
}
\makeatother

-
Excuse me, but could you elaborate a little further? What exactly does 'vertical mode' mean? I have to admit that I haven't written the command by myself, therefore don't really know how it works, however, am very eager to learn. –  cherrung Jun 9 '12 at 21:14
(very simple and somehow incorrect explanation) At the beginning of a cell, LaTeX is in "vertical" mode, which means that things "tend to be put atop each other", which makes \phantomsection occupy its own line, even though it does not print anything. By \leavevmode you "leave vertical mode" and enter "horizontal mode", where things are put next to each other and \phantomsection occupies zero horizontal space then. –  tohecz Jun 9 '12 at 21:25
I was away from machine but @tohecz gives a good explanation. Searching for "mode" on this site or other tutorials will give other examples of this distinction. –  David Carlisle Jun 9 '12 at 21:59