denippet.vim icon indicating copy to clipboard operation
denippet.vim copied to clipboard

Do not use the unnamed register for TM_SELECTED_TEXT

Open kit494way opened this issue 7 months ago • 4 comments

Using the unnamed register causes an unexpected text to be used as the TM_SELECTED_TEXT.

kit494way avatar Jun 15 '25 12:06 kit494way

You should explain the unexpected example.

Shougo avatar Jun 16 '25 01:06 Shougo

I set unnamedplus to clipboard. When I operate a yank or delete, the text is stored in the unnamed register. When using snippets, if TM_SELECTED_TEXT is included, the text in the unnamed register is used unintentionally.

kit494way avatar Jun 16 '25 04:06 kit494way

Hm...

Shougo avatar Jun 16 '25 05:06 Shougo

@uga-rosa I think getregion() should be used instead.

Shougo avatar Jun 16 '25 06:06 Shougo