comment-box.nvim icon indicating copy to clipboard operation
comment-box.nvim copied to clipboard

Comment boxing URL fails

Open balazser opened this issue 3 years ago • 0 comments

Hi @LudoPinelli, I noticed comment-box.nvim fails when I'm commenting out an URL.

Reproduce:

  1. move cursor to line containing https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/discuss/1054742/Python-O(logn)
  2. call :CBlbox on the line
  3. You should get the following error message:
E5108: Error executing lua ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:114: attempt to perform arithmetic on local 'f' (a nil value)
stack traceback:
        ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:114: in function 'wrap'
        ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:137: in function 'get_text'
        ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:197: in function 'create_box'
        ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:422: in function 'display_box'
        ...k/packer/start/comment-box.nvim/lua/comment-box/init.lua:453: in function 'lbox'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

balazser avatar May 29 '22 17:05 balazser