Skip to content

texstudio crashes if %file arg is after linebreak #2985

@mbertucci47

Description

@mbertucci47

Environment

  • TeXstudio: git4.5.1
  • Qt: 6.4.2
  • OS: Windows 10
  • TeX distribution: miktex

I'm not sure if this happened before the recent addition of %file as an arg spec, but currently if you try to Ctrl+Click a file name in the arg of a command after a line break, texstudio freezes, then closes. For example try opening the file

\documentclass{article}
\usepackage{pdfpages}

\begin{document}

\includepdf[
	nup=2x2
	]
	{test.pdf}

%% any of the following will also cause texstudio to crash
%% \includepdf
%%	{test.pdf}
%% 
%% \includepdf[
%% 	nup=2x2]
%% 	{test.pdf}
%% 	
%% \input
%% 	{test.tex}
	
\end{document}

I use pdfpages as an example since it is common to write the options of \includepdf on a new line, but the bug also occurs with just

\input
    {test.tex}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions