Skip to content
Discussion options

You must be logged in to vote

The seen phenomenon is actually a bug with Micro: #3303

What's damaged is the loaded content and not the view, however one workaround is clearing the buffer before calling ReOpen():

local buf = bp.Buf
buf:Replace(buf:Start(), buf:End(), "")
buf:ReOpen() -- note that it's possible this returns an error

The code isn't good, but I've done this in a plugin I wrote before: https://github.com/niten94/micro-uchardet/blob/v1.1.2/plug.lua#L47

Replies: 1 comment 1 reply

Comment options

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

Answer selected by DeCEll-1
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