vim-easymotion icon indicating copy to clipboard operation
vim-easymotion copied to clipboard

`call execute('colorsheme foo')` crashes Easymotion in Vim

Open utubo opened this issue 6 months ago • 1 comments

Vim version 9.1.1336

Steps

  1. Use easymotion once.
  2. :call execute('colorsheme blue') (also, :call win_execute(winid, 'syntax enable') from :help popup-buffer.)

Actual

Error detected while processing ColorScheme Autocommands for "*"..function EasyMotion#highlight#i
nit[1]..EasyMotion#highlight#InitHL:
line   14:
E930: Cannot use :redir inside execute()
E930: Cannot use :redir inside execute()
line   17:
E121: Undefined variable: hlstatus

Cause redir inside execute causes E930 in Vim 8.0 or later.

utubo avatar May 02 '25 12:05 utubo

I have not tested this, but it looks like this is what needs to be fixed.

https://github.com/utubo/vim-easymotion/commit/074916f6aef57de3c6374b9bccf55f336e3d9a11

utubo avatar May 02 '25 12:05 utubo