Vertical border between number and code in lstlisting

what I am trying to achieve is a vertical line between the line numbers and the code in a lstlisting. I have experimented with the frame option a lot, but i guess it is not possible this way, if at all.

As a visual example check out this css plugin which i use on a website. It should look quite simmilar which is why i am asking this question.

Any help is greatly appreciated! Thanks.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– user31729
Oct 13 '14 at 13:47

Option frame=leftline:

\documentclass{article}
\usepackage{listings}

\begin{document}
\lstset{numbers=left,frame=leftline}
\begin{lstlisting}
\usepackage{xifthen}
\makeatletter
%JB Taken from tufte-common.def
\newcommand{\plainauthor}{}%
\newcommand{\thanklesspublisher}{}%
\newcommand{\thanklessauthor}{}%
\renewcommand*{\author}[2][]{%
\gdef\@author{#2}%
\begingroup%
% TODO store contents of \thanks command%
\renewcommand{\thanks}[1]{}%
\protected@xdef\thanklessauthor{#2}%
\endgroup%
\ifthenelse{\isempty{#1}}%
{\renewcommand{\plainauthor}{\thanklessauthor}}%
{\renewcommand{\plainauthor}{#1}}%