I am using unicode characters in some code examples.
If I set the listing completely, everything works as expected when the font supoorts the characters. But once I want to omit lines with lsitings's linerange option, things get messy.
When I run this minimal example with lualatex:
\documentclass{standalone}
% allow unicode characters in listings
\RequirePackage{fontspec}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\usepackage{listings}
\lstset{language=[Objective]Caml,
showspaces=false,
showtabs=false,
breaklines=true,
showstringspaces=false,
breakatwhitespace=true,
escapeinside={(*@}{@*)},
basicstyle=\ttfamily,
columns=fullflexible,keepspaces=true
inputencoding=utf8
}
\begin{document}
\begin{lstlisting}[linerange=2-2]
(* This line should be ignored λx.x *)
let f x = x
\end{lstlisting}
\end{document}
The lambda unicode character is not skipped but prepended, while the rest of the line is skipped:
Is this a bug in listings or do I miss some arcane option?

