tyru / caw.vim

Vim comment plugin: supported operator/non-operator mappings, repeatable by dot-command, 300+ filetypes
379 stars 48 forks source link

Error on uncomment #187

Open yuntan opened 1 year ago

yuntan commented 1 year ago

Following error occurred when uncommenting lines.

[Vim(if):E5108: Error executing lua /Users/yuto/.local/share/nvim/plugged/caw.vim/lua/caw.lua:26: attempt to index field 'hl_map' (a nil val
ue)<00>stack traceback:<00><09>/Users/yuto/.local/share/nvim/plugged/caw.vim/lua/caw.lua:26: in function 'has_syntax'<00><09>[string "luaeva
l()"]:1: in main chunk]::[function caw#keymapping_stub[78]..66[11]..71[2]..68[2]..58[4]..69, line 9]

sample code:

// set ft=typescript
    const timer = setInterval(() => {
      if (!replayRef.current?.contentWindow) {return;}
      // replayRef.current?.contentWindow?.addEventListener("message", (ev) => {
      //   if (ev.origin === `${location.protocol}//${location.host}`) {
      //     console.log(ev.data);
      //     window.postMessage(ev.data, "*");
      //   }
      // });
      clearInterval(timer);
    }, 100);
スクリーンショット 2023-08-04 19 37 27

neovim: v0.9.1

yuntan commented 1 year ago

185 fixed the issue.