Skip to content

What is the difference between hide and unmount? #316

Answered by MunifTanjim
MLFlexer asked this question in Q&A
Discussion options

You must be logged in to vote

:hide doesn't do any cleanup, :unomunt does cleanup.

Say you :mount a popup, then modify it's content (e.g. write something on the buffer).

If you do :hide, that modified buffer content will be preserved. If you do :show afterwards, you'll see the same content.

If you do :unmount, the buffer will be destroyed (along with other stuffs, e.g. keymaps). If you do :mount/:show afterwards, a new buffer will be created.

ref: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup#popuphide

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MLFlexer
Comment options

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