summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-25 19:52:40 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-25 19:52:40 -0500
commitd453eedc5282074af83375532e8edcb68ada3300 (patch)
tree204b9f87cf187e03e856d1c997a3fb6d300e761f /ted.c
parent2baf965c7db4a3640cd120e050c61aa7de67448b (diff)
started tab moving
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ted.c b/ted.c
index 5ad3f82..fcc1bb1 100644
--- a/ted.c
+++ b/ted.c
@@ -94,7 +94,8 @@ static void ted_load_fonts(Ted *ted) {
// returns the index of an available buffer, or -1 if none are available
static i32 ted_new_buffer(Ted *ted) {
bool *buffers_used = ted->buffers_used;
- for (i32 i = 0; i < TED_MAX_BUFFERS; ++i) {
+ for (i32 i = 1; // start from 1, so as not to use the null buffer
+ i < TED_MAX_BUFFERS; ++i) {
if (!buffers_used[i]) {
buffers_used[i] = true;
buffer_create(&ted->buffers[i], ted);