ref(Popup): set Popup.window to nil after :close()

Before this commit, Popup.window would only be set to `nil` if there was
a valid window found. It is proposed that `nil` shuold be set especially
if there is no valid window found, as an invalid window value shouldn't
be kept around.
pull/9/head
Iron-E 4 years ago
parent 97f0ac7922
commit 932eb5cd78
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22

@ -65,9 +65,10 @@ local _metaPopup = require('libmodal/src/classes').new(Popup.TYPE)
function _metaPopup:close(keepBuffer)
if valid(self.window) then
api.nvim_win_close(self.window, false)
self.window = nil
end
self.window = nil
if not keepBuffer then
self.buffer = nil
self._inputChars = nil

Loading…
Cancel
Save