Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

fix: avoid exception when calling :Reject on last element #11

Merged
merged 1 commit into from
Jan 21, 2024

Conversation

mivort
Copy link
Contributor

@mivort mivort commented Jan 17, 2024

This commit adds array length check gate before setting the cursor position on list entry removal with :Reject command. It allows to avoid the following exception which gets produced otherwise:

E5108: Error executing lua .../qf_helper.nvim/lua/qf_helper.lua:180: Cursor position outside buffer

This commit adds array length check gate before setting the cursor position on list entry removal with `:Reject` command. It allows to avoid the following exception which gets produced otherwise:
```
E5108: Error executing lua .../qf_helper.nvim/lua/qf_helper.lua:180: Cursor position outside buffer
```
@mivort mivort force-pushed the fix-last-item-exception branch from cb4a634 to eab6c9c Compare January 17, 2024 20:53
@stevearc
Copy link
Owner

LGTM thanks!

@stevearc stevearc merged commit 91dad02 into stevearc:master Jan 21, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants