Skip to content
New issue

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

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

Already on GitHub? # to your account

keyval completion from empty string fails if on new line #3962

Open
mbertucci47 opened this issue Jan 27, 2025 · 0 comments
Open

keyval completion from empty string fails if on new line #3962

mbertucci47 opened this issue Jan 27, 2025 · 0 comments

Comments

@mbertucci47
Copy link
Contributor

Environment

  • TeXstudio: 4.8.6
  • Qt: 6.8.1
  • OS: windows 11
  • TeX distribution: N/A

Expected behavior

For most commands that accept keyvals, it is valid TeX syntax to place the keyval entries on a new line after the command. For example, one might write the keyval entries for \tcbset of tcolorbox like

\tcbset{
  key1=value1,
  key2=value2,
}

or

\tcbset
  {
    key1=value1,
    key2=value2,
  }

With these or any other code formats, TXS should be able to autocomplete keyvals from an empty string.

Actual behavior

TXS can autocomplete keyval entries from the empty string, but this fails if the cursor is on line different from the command. For example, placing the cursor on the line after \tcbset and hitting Ctrl+Space does not bring up the autocompleter:

\tcbset{
  
  }

The completer has no problems completing a keyval that is already partially typed.

How to reproduce

Place your cursor before the comments and hit Ctrl+Space.

\documentclass{article}
\usepackage{tcolorbox}

\begin{document}

\tcbset{ % works with cursor on this line
    % does not work with cursor on this line
  }

\tcbset
  {  % does not work with cursor on this line
     % does not work with cursor on this line
  }
  
\end{document}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant