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

Cannot reset cursor position after clicking on the modal #654

Closed
kristijanhusak opened this issue Feb 21, 2020 · 5 comments · Fixed by #962
Closed

Cannot reset cursor position after clicking on the modal #654

kristijanhusak opened this issue Feb 21, 2020 · 5 comments · Fixed by #962
Labels
bug Something isn't working gocui

Comments

@kristijanhusak
Copy link
Contributor

Describe the bug
I'm not sure if this is bug with gocui, but i'll report it here, you'll know better.
When you open a commit message modal, and type few characters, then click with mouse in the middle of the modal, cursor will go to that position. If you continue typing, it will type, but cursor will be at wrong position all the time. Also you cannot delete anything after that happens.

To Reproduce
Steps to reproduce the behavior:

  1. Stage some files
  2. Open "Commit message" dialog with C
  3. Type in few characters
  4. Click with mouse in the middle of the commit message dialog
  5. Continue typing, notice the behavior of the cursor
  6. Try deleting with backspace, nothing happens

Expected behavior
I guess either cursor should jump back to the right position or clicking in the middle of modal should not even trigger cursor movement.

Screenshots
I'm not able to make a screenshot that shows the cursor for me, i'm probably using bad tool for it.

Desktop (please complete the following information):

  • OS: Linux
  • Lazygit Version - Unversioned, using from git
  • Commit: master branch - 205d731

Additional context
restarting lazygit fixes it.

@kristijanhusak kristijanhusak added the bug Something isn't working label Feb 21, 2020
@jesseduffield
Copy link
Owner

Yeah I've seen this as well. I believe over in awesome/gocui work is being done to make the editing experience better wrt cursors: awesome-gocui/gocui#48

@kristijanhusak
Copy link
Contributor Author

@jesseduffield I pulled latest change (via go get), and it's still happening. I also verified that latest gocui vendor vas pulled.

@jesseduffield
Copy link
Owner

my bad, should be good now on master!

@kristijanhusak
Copy link
Contributor Author

Works now, thanks!

@jesseduffield
Copy link
Owner

no worries :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gocui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants