ultisnips icon indicating copy to clipboard operation
ultisnips copied to clipboard

wrong cursor position

Open Starslayerx opened this issue 2 years ago • 1 comments

I asked the problem at coc-issue firstly.
I thought this could caused by my snippet? And the output of :verbose imap <tab> shows

<Tab>       * <C-R>=UltiSnips#ExpandSnippet()<CR>
            ~/.config/nvim/plugged/ultisnips/autoload/UltiSnips/map_keys.vim line 61

Aftre I updated all my vim plugs and changed python verson to 3.8 recently. Tab doesn's works fine.

161675283-11f6b219-9bdf-40b5-9161-15cceb2473fe 161675314-87e01cf9-a8ca-4c99-9528-96f3db38be60

Then I press Tab , and I got this

161675330-92449f2e-9c3d-4cc5-98f3-87303a5cc52a

Snippets I defined by myself also has same behavior.

snippet cn
const int ${1:variable} = ${0:number};
endsnippet

After I changed $0 to $2, It works fine.

snippet cn
const int ${1:variable} = ${2:number};
endsnippet

Seems many snippets have this issue

截屏2022-04-05 12 56 00 截屏2022-04-05 12 53 56

After press Tab

截屏2022-04-05 12 54 40

Starslayerx avatar Apr 05 '22 04:04 Starslayerx

I have same issue sometimes. Does it happen to you every time? If not, I think it is not problem of UltiSnips.

pilgrimlyieu avatar Jun 02 '22 10:06 pilgrimlyieu