Skip to content

Exec example but using WithAltScreen() prints output to outside of the altscreen #424

Answered by bashbunni
zd4y asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @zd4y,
you can check out the Gist I made with the functionality you're looking for here.

Basically what you're looking to do is have a field in your model for when you're quitting your application so that View can output an empty string as the final render to the terminal. In this case with the editor, you have to temporarily set this as we have to exit the alt screen when the editor opens, then when we quit the editor we want to see the prompt again. You'll see all of that written as code in the example provided. Let me know if this answers your question!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zd4y
Comment options

@meowgorithm
Comment options

@bashbunni
Comment options

@bernardo1r
Comment options

Answer selected by zd4y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #402 on August 25, 2022 20:49.