Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Selectoed process out of bounds in grofer proc #122

Open
anihm136 opened this issue Jun 1, 2021 · 0 comments
Open

[BUG] Selectoed process out of bounds in grofer proc #122

anihm136 opened this issue Jun 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@anihm136
Copy link
Contributor

anihm136 commented Jun 1, 2021

Describe the bug
When the process list changes for any reason and is refreshed, if the number of processes in the refreshed list is less than the index of the currently selected process, the selection goes out of bounds and no process is selected

To Reproduce
Steps to reproduce the behavior:

  1. grofer proc
  2. Scroll down to the last process
  3. Wait for a while (or kill a process if you're impatient)
  4. No process is selected

Expected behavior
If the selection goes out of bounds, cursor should reset to the last element in the new list

Screenshots
image
Before termination of last process
image
After termination of last process

Desktop (please complete the following information):

  • OS: Linux 5.12.7-arch1-1
  • Go Version: 1.16.4 linux/amd64

Additional context
Seems generally harmless for now, does not cause any crashes. Using any of the navigation keys from this state resets the selection to a valid position. However, this caused some issues on #112 for which a temporary fix has been made. Updating the selection using calcPos after every process refresh seems to fix the problem, but has not been tested for adverse behaviors or side effects

@anihm136 anihm136 added the bug Something isn't working label Jun 1, 2021
@Gituser143 Gituser143 added the hacktoberfest Issues for Hacktoberfest 2021 label Sep 30, 2021
@Gituser143 Gituser143 removed the hacktoberfest Issues for Hacktoberfest 2021 label Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants