When coroutines active don't wait
This commit is contained in:
@@ -8,28 +8,13 @@
|
||||
- Maybe 2 windows?
|
||||
- Guide on the first page for new users with links to configs, tutorials
|
||||
|
||||
- Window, View, Buffer + flags design (or is completely new kind based approach needed for Windows/Views?)
|
||||
- How to make non-editable, informative, with different font size, title bar. Which might also contain tabs
|
||||
- How to design clickable tree view in this way?
|
||||
- How to design Command view?
|
||||
- How to design popup view (input field)?
|
||||
- How to design search view? or search and replace view?
|
||||
|
||||
Splits:
|
||||
- Why constraint that name of buffer needs to be unique? For Open() and default behavior but is this required?
|
||||
- Try to add Tracking Allocator and rewrite the app, free all memory at the end of the app and check all is well
|
||||
|
||||
Commands TODO:
|
||||
- Search
|
||||
- Ctrl + F
|
||||
- Next occurence: Enter
|
||||
- Prev occurence: Shift + Enter
|
||||
- next occurence: F3
|
||||
- prev occurence: Shift + F3
|
||||
- Console: OK concept but constrain
|
||||
- Turned off by default
|
||||
- Special: non editable, hotkeys don't work etc.
|
||||
- I'M SETTING ACTIVE WINDOW AFTER COMMAND!!! DO WE CONTINUE WITH THIS?
|
||||
|
||||
- CONSIDER AUTOMATING: CheckpointBeforeGoto
|
||||
- GotoBackward how to handle that in case we want to automate and create on every move?
|
||||
|
||||
@@ -675,7 +675,7 @@ void Coro_OpenCode(mco_coro *co) {
|
||||
}
|
||||
|
||||
|
||||
if ((i%16) == 0) {
|
||||
if ((i%32) == 0) {
|
||||
CoYield(co);
|
||||
}
|
||||
i += 1;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
typedef void CoroutineProc(mco_coro *co);
|
||||
Array<mco_coro *> ActiveCoroutines;
|
||||
|
||||
mco_coro *CoAdd(CoroutineProc *proc) {
|
||||
mco_desc desc = mco_desc_init(proc, 0);
|
||||
|
||||
@@ -465,6 +465,7 @@ inline void AddEvent(Array<Event> *events, Event ev) {
|
||||
}
|
||||
|
||||
Array<Event> GetEventsForFrame(Allocator allocator) {
|
||||
ProfileFunction();
|
||||
Array<Event> result = {allocator};
|
||||
if (EventPlayback.len) {
|
||||
result = TightCopy(allocator, EventPlayback);
|
||||
|
||||
@@ -81,6 +81,7 @@ Array<Variable> Variables;
|
||||
|
||||
Array<Process> ActiveProcesses = {};
|
||||
Array<String> ProcessEnviroment = {};
|
||||
Array<mco_coro *> ActiveCoroutines;
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
@@ -605,13 +605,14 @@ void MainLoop() {
|
||||
}
|
||||
|
||||
WaitForEvents = ConfigWaitForEvents;
|
||||
if (IsDocumentSelectionValid() || IsScrollbarSelectionValid() || ActiveProcesses.len) {
|
||||
if (IsDocumentSelectionValid() || IsScrollbarSelectionValid() || ActiveProcesses.len || ActiveCoroutines.len) {
|
||||
WaitForEvents = false;
|
||||
}
|
||||
|
||||
// This shouldn't matter to the state of the program, only appearance for
|
||||
// the user
|
||||
{
|
||||
ProfileScope(SetWindowTitle);
|
||||
Window *window = GetActiveWind();
|
||||
View *view = GetView(window->active_view);
|
||||
Buffer *buffer = GetBuffer(view->active_buffer);
|
||||
|
||||
Reference in New Issue
Block a user