vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 5732e17ff457d6982f18fddc6777df549947a667 parent 63f0b588931387d400f3f90161b1f2eba19ccfed Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 7 Jul 2015 09:09:29 +0200 text: remove left over debugging code Diffstat:
| M | text.c | | | 6 | ------ |
1 file changed, 0 insertions(+), 6 deletions(-)
diff --git a/text.c b/text.c @@ -70,7 +70,6 @@ struct Piece { Piece *global_next; /* used to free individual pieces */ const char *data; /* pointer into a Buffer holding the data */ size_t len; /* the lenght in number of bytes starting from content */ - int index; /* unique index identifiying the piece */ }; /* used to transform a global position (byte offset starting from the begining @@ -124,7 +123,6 @@ struct Text { Buffer *buffers; /* all buffers which have been allocated to hold insertion data */ Piece *pieces; /* all pieces which have been allocated, used to free them */ Piece *cache; /* most recently modified piece */ - int piece_count; /* number of pieces allocated, only used for debuging purposes */ Piece begin, end; /* sentinel nodes which always exists but don't hold any data */ Action *history; /* undo tree */ Action *current_action; /* action holding all file changes until a snapshot is performed */ @@ -454,7 +452,6 @@ static Piece *piece_alloc(Text *txt) { if (!p) return NULL; p->text = txt; - p->index = ++txt->piece_count; p->global_next = txt->pieces; if (txt->pieces) txt->pieces->global_prev = p; @@ -1000,9 +997,6 @@ Text *text_load(const char *filename) { if (!txt) return NULL; int fd = -1; - txt->begin.index = 1; - txt->end.index = 2; - txt->piece_count = 2; piece_init(&txt->begin, NULL, &txt->end, NULL, 0); piece_init(&txt->end, &txt->begin, NULL, NULL, 0); lineno_cache_invalidate(&txt->lines);