Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cite and ref autocompletion eats proceeding text #3874

Open
mbertucci47 opened this issue Nov 13, 2024 · 0 comments
Open

cite and ref autocompletion eats proceeding text #3874

mbertucci47 opened this issue Nov 13, 2024 · 0 comments

Comments

@mbertucci47
Copy link
Contributor

mbertucci47 commented Nov 13, 2024

Environment

  • TeXstudio: 4.8.5beta2
  • Qt: 6.8.0
  • OS: Windows 10

Expected behavior

Autocompletion for \cite just inserts the completed text.

Actual behavior

If the following text is not a comma, it gets removed until the next space. This image shows the autocompleter:

pic1

And here is after pressing "Enter":

pic2

The text abc is removed after completing. The same is true if abc is replaced with a period, anything except a comma since that's treated specially for multiple citations.

The problem is also there for \label and \ref completion.

This does not happen with keyval completion. If you replace \cite{abc def with \pagenumbering{abc def, place your cursor between { and abc, open the completer, and choose an option, you get the expected thing, e.g. \pagenumbering{Alphabc def

Yes, this is not an issue if you use the completer for commands so there's never a missing closing brace, however I tend to type out commands manually and use the completer for the argument.

How to reproduce

Example file

\documentclass{article}

\begin{document}

\cite{abc def

\begin{thebibliography}{9}
\bibitem{blub}
\end{thebibliography}

\end{document}

For \label/\ref:

\documentclass{article}

\begin{document}

\label{foo}

\ref{abc def

\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants