--- /dev/null
+# Issue List
+
+Up Next:
+
+* refactor x11.c and win.c
+* Make Fn keys execute nth command in the tags buffers
+* Run commands in the background and don't block the main thread.
+* check for file changes on save
+* check for file changes when window regains focus
+* 100% coverage with unit and unit-integration tests
+* right click to fetch file or line
+* Status line should omit characters from beginning of path to make file path fit
+
+Straight-up Bugs:
+
+* double free error on picking a tag with nothing in the buffer
+* fix crash on saving read-only file
+* fix crash on save to file that can't be created
+* tab inserts dont coalesce like one would expect
+
+The Future:
+
+* shortcut to repeat previous operation
+* add command line flags to toggle options (Tabs, Indent, etc..)
+* add command env vars to set options (Tabs, Indent, etc..)
+* implement command diffing logic to optimize the undo/redo log
+
+# Auxillary Programs
+
+* Visual diff tool
+* Win-like terminal emulator
+* File browser
+* Acme-like window manager
ScrollLines = 4, /* number of lines to scroll by for mouse wheel scrolling */
BufSize = 8192, /* default buffer size */
FontCacheSize = 16, /* Maximum number of fonts allowed in the font cache */
+ EventTimeout = 100, /* Maximum blocking wait time for events */
};
/* choose the font to use for xft */
void x11_flush(void);
void x11_finish(void);
+int x11_events_queued(void);
bool x11_events_await(unsigned int ms);
void x11_events_take(void);
x11_show();
x11_flip();
while (x11_running()) {
- bool pending = x11_events_await(200 /* ms */);
- if (update_focus() || pending) {
+ bool pending = x11_events_await(EventTimeout);
+ int nevents = x11_events_queued();
+ if (update_focus() || pending || nevents) {
x11_events_take();
if (x11_running())
x11_flip();
- } else {
- x11_flush();
}
+ x11_flush();
}
x11_finish();
}
}
}
+int x11_events_queued(void) {
+ return XEventsQueued(X.display, QueuedAfterFlush);
+}
+
bool x11_events_await(unsigned int ms) {
fd_set fds;
int xfd = ConnectionNumber(X.display), redraw = 1;