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

Mouse binding is not working after resuming back from Application.Suspend() #545

Closed
ajaxray opened this issue Jan 8, 2021 · 2 comments
Closed

Comments

@ajaxray
Copy link
Contributor

ajaxray commented Jan 8, 2021

Hello folks,
Need your kind help for geek-life, a CLI To-Do List Manager.

I am trying to edit some content (task detail) using external editor.
So, I am doing this:

  • Writing the content in a temporary file
  • Using Application.Suspend() for opening the temporary file in vim (or $EDITOR from env)
  • On Save and Exit of editor, reading back the tmp file content
app.Suspend(func() {
    // Opening a tmp file in external editor
    // Reading tmp file content after returning back
})
// ... 
app.EnableMouse(true)

You may check actual code here.

It's working as expected and the new content is being saved.
But the problem is, Mouse bindings are no more working after resuming application.
Even calling app.EnableMouse(true) manually after Suspend is not working. :(

Any support/clue is very much appreciated. Thanks!

@ajaxray ajaxray changed the title Mouse binding is not working after resuming back from Application.Suspend() Mouse binding is not working after resuming back from Application.Suspend() Jan 8, 2021
@rivo rivo closed this as completed in a72fc10 Jan 11, 2021
@rivo
Copy link
Owner

rivo commented Jan 11, 2021

Thanks for noticing this. The tcell.Screen object is replaced after the Suspend() function returns but I forgot to enable the mouse on that new object. This should be fixed now.

@ajaxray
Copy link
Contributor Author

ajaxray commented Jan 15, 2021

@rivo Thanks a lot!
The issue is now fixed after updating.

ajaxray added a commit to ajaxray/geek-life that referenced this issue Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants