iron.nvim icon indicating copy to clipboard operation
iron.nvim copied to clipboard

E5108: end_col value outside range when sending wrapped line to REPL

Open jolars opened this issue 3 years ago • 6 comments

If I decrease the width of a line in a buffer so that it gets wrapped, I receive the following error upon trying to send it (the line) to the REPL:

E5108: Error executing lua: ...nvim/site/pack/packer/start/iron.nvim/lua/iron/marks.lua:39: end_col value outside range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...nvim/site/pack/packer/start/iron.nvim/lua/iron/marks.lua:39: in function 'set'
        .../nvim/site/pack/packer/start/iron.nvim/lua/iron/core.lua:214: in function <.../nvim/site/pack/packer/start/iron.nvim/lua/iron/core.lua:207>

This happens regardless of whether I do a visual send or a send motion. This also happens if I select several lines and the last of them is wrapped. Sending a block with a wrapped line works fine as long as it's not the last line in the block.

jolars avatar Jun 30 '22 14:06 jolars

Hi, sorry for the long time to answer, I've been absent for some time due to summer vacations.

I think this might've been fixed by #272. Would you mind checking it out?

Best regards, Henry

hkupty avatar Jul 11 '22 06:07 hkupty

No worries, thanks for responding. The fix unfortunately doesn't solve my problem.

jolars avatar Jul 11 '22 14:07 jolars

Ok, I'll try to find some time between today and tomorrow to investigate.

Best regards, Henry

hkupty avatar Jul 11 '22 15:07 hkupty

I also experience this bug, which is a bit annoying. If wrapping is turned off in Vim :setlocal nowrap it works as expected, but when lines are wrapped the problem occurs as described by @jolars

cands avatar Sep 22 '22 08:09 cands

I get the same error when the text object is larger, than the part of buffer that is visible. For example, in Markdown, when I use i`<CR> (inner backticks) in order to send the code block content, where <CR> is mapped to the appropriate send command, it raises an error when the code spans more the visible portion of the buffer. But when I first select it with vi` and then send, it works as expected.

jakubkaczor avatar Oct 14 '22 07:10 jakubkaczor

Has there been any update yet? I have also noticed that i get this error when any line sent is wrapped. The only way to fix it is to 'set nowrap' but that would not be very ideal.

brianfabre avatar Jan 03 '23 17:01 brianfabre