ultisnips icon indicating copy to clipboard operation
ultisnips copied to clipboard

Nested one-line snippets work abnormally

Open pilgrimlyieu opened this issue 1 year ago • 0 comments

Actual behavior:

1

Related snippets
snippet '(?a)\blm' "行内公式 Inline Formula" Ar
$$1$ $0
endsnippet

snippet case "Cases 环境 Cases Environment" w
\begin{cases} $1 \end{cases} $0
endsnippet

That is, sometimes* the cursor will select the outer placeholder if inner placeholders are jumped out.

*: Sometimes it works normally.

Besides, if snippets are multi-line snippets, it seems to work normally.

2

For example
snippet dm "行间公式 Display Formula" Ab
$$
$1
$$
$0
endsnippet

snippet case "Cases 环境 Cases Environment" w
\begin{cases}
    ${1:${VISUAL}}
\end{cases}
$0
endsnippet

Maybe related to the situation 3 of #1472?

Steps to reproduce

  1. Add above snippets
  2. Type as the GIF demonstrates
  3. Then sometimes it will work abnormally like this

  • Operating System: Windows 10
  • Vim Version: 9.0
  • UltiSnips Version: 3.2
  • Python inside Vim: 3.10.4

pilgrimlyieu avatar Jul 23 '22 15:07 pilgrimlyieu