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

Expose screen.Redraw() to lua #2944

Closed
wants to merge 1 commit into from

Conversation

dmaluka
Copy link
Collaborator

@dmaluka dmaluka commented Sep 30, 2023

If lua code is running asynchronously, e.g. in a timer callback passed to time.AfterFunc(), micro does not automatically update the screen contents after the actions performed by this async lua code. For such cases, expose screen.Redraw() to lua (as micro.Redraw()) to let lua code explicitly request screen update when needed.

Fixes #2923

If lua code is running asynchronously, e.g. in a timer callback passed
to time.AfterFunc(), micro does not automatically update the screen
contents after the actions performed by this async lua code. For such
cases, expose screen.Redraw() to lua (as micro.Redraw()) to let lua code
explicitly request screen update when needed.

Fixes zyedidia#2923
@dmaluka
Copy link
Collaborator Author

dmaluka commented Sep 30, 2023

After I submitted this PR I've noticed that @X-Ryl669 has already submitted #2939 which does the same. Feel free to pick whichever looks better.

@dmaluka
Copy link
Collaborator Author

dmaluka commented Oct 1, 2023

Duplicates #2939, closing this one to avoid confusion.

@dmaluka dmaluka closed this Oct 1, 2023
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

Successfully merging this pull request may close these issues.

Timer callback in lua plugins can't refresh the screen
1 participant