Closed shayne closed 8 years ago
Looking into it.
Thanks.
Yes - oh that just means @shayne is using the wrong command I guess.
@shayne check out this Wiki to ensure you're using the syntax properly:
https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawtext-text
The issue is that those methods are on UI.redraw.clear
and UI.redraw.done
, not actually on the UI class. Since the UI is a singleton we can inject the reference to it but it's just weird design that wasn't caught when we moved to Babel. I'm working on it, seeing if it's possible to put together a test case.
? Not sure what moving to Babel does to this?
@dthree It's because UI wasn't a class
before, it was just an object, so the redraw function is a little weird. I think I've submitted a fix (please review). I'd like to get a test case for this type of thing too.
Okay - looks okay. Could you look at this though:
https://github.com/dthree/vorpal/blob/e96e37daf2b8886155f219d83639a013a1a1f314/lib/ui.js#L569
UI already has some... interesting functionality in that it has to extend global for a single instance. This is really important, so I want to make sure these changes don't mess with that.
Yeah, I looked at this earlier, I think it's basically a singleton. It's interesting design but I don't see an issue with it.
Okay. Go ahead and merge, and I'll publish. :+1:
Should be ready for publish but if @shayne can verify it solves his issue that'd be ideal.
Okay we'll wait up a bit for him. I think I stumbled into this as well yesterday but didn't have time to look into it, so I'll check it out on my pjt.
Okay I pretty thoroughly tested it. Published, but want to wait for @shayne before closing this issue.
Thanks for your help @scotthovestadt - I'm happy Vorpal has a bus factor of 2 now :smiley:
This works great. Amazing speed. :trophy:
Great!
As of vorpal 1.8.8 I'm getting the following when issuing
vorpal.ui.redraw.clear(); vorpal.ui.redraw.done()