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

E5555: API call: col value outside range

Open tzachar opened this issue 3 years ago • 6 comments

When pressing ctr while standing on the last character in line I get the following:

Error detected while processing function <SNR>37_save_pos:                                                                                                                    
line    3:                                                                                                                                                                    
E5555: API call: col value outside range            

Probably have something to do with zero/one based indexing of columns.

tzachar avatar Jun 16 '21 09:06 tzachar

Thanks for the issue. I'll have a look!

hkupty avatar Jun 16 '21 17:06 hkupty

I've opened a PR that fixes this issue: https://github.com/hkupty/iron.nvim/pull/194

ianliu avatar Aug 13 '21 16:08 ianliu

For some reason I didn't get a notification for this one. I've merged the PR, thanks a lot @ianliu! @tzachar can you please check?

hkupty avatar Aug 16 '21 15:08 hkupty

Hi,

This fixes the erorr, but jumps the cursor one line upwards. I can't decide which is more annoying :)

tzachar avatar Aug 16 '21 19:08 tzachar

I also get the following error by visually selecting a chunk and writing ctr

E5108: Error executing lua ...nvim/site/pack/packer/start/iron.nvim/lua/iron/marks.lua:33: end
_line value outside range

This only happens if a new terminal is opened.

Edit: Executing a shorter chunk gives

E5108: Error executing lua ...nvim/site/pack/packer/start/iron.nvim/lua/iron/marks.lua:33: end
_col value outside range

But looking at marks.lua line 16 and 17

end_line = opts.to_line or opts.from_line,
end_col = opts.to_col

and setting either value to - 1 still gives the same error message. How can I fix this?

Update: I've found that this seems not to be an issue of this plugin, but of the extmark (nvim_buf_set_extmark) function from treesitter or neovim itself. Already mentioned here and here and here

timoleistner avatar Sep 12 '21 17:09 timoleistner

I've recently fixed some issues in extracting and sending the data to the repl in #221 . Please let me know if this issue is fixed by that one as well.

hkupty avatar May 18 '22 13:05 hkupty