martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.23k stars 256 forks source link

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

Open ingolemo opened 4 years ago

ingolemo commented 4 years ago

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