vis icon indicating copy to clipboard operation
vis copied to clipboard

LuaAPI: `vis:draw()` doesn't work

Open ingolemo opened this issue 5 years ago • 0 comments

The Lua function vis:draw() does not redraw the screen. Firstly because it doesn't exist; the function is actually called vis:redraw(). The documentation calls this function draw but the source code calls it redraw, I don't know which name is correct.

Secondly when you call vis:redraw() is appears not to do anything. Running vis.win.file:insert(0, 'a') will invalidate the ui and require it to be redrawn, but running vis:redraw() has no effect. vis:win.draw() redraws the current window, but this does not cover the case where the current file is visible in multiple windows.

For the context of how i ran into this issue, please see the following:
https://github.com/ingolemo/vis-smart-backspace/issues/2

ingolemo avatar Aug 10 '20 18:08 ingolemo