An extensible POSIX-compatible implementation of the ed(1) text editor
git clone https://git.8pit.net/edward.git
1;;> A text buffer for line-based data with [undo support][undo section]. 2;;> Operations on the buffer address lines, the first line starts at 3;;> index 1. The special index 0 can be used with the [append command][append command] 4;;> to insert text before the first line. For other commands, index 0 is 5;;> equivalent to index 1. Targeting a line outside the current buffer 6;;> bounds causes an error to be raised. 7;;> 8;;> [undo section]: #section-undo-stack 9;;> [append command]: #buffer-append!1011(define-library (edward.buffer)12 (import (scheme base)13 (scheme case-lambda)1415 (srfi 1)1617 (only (chicken base) vector-resize)1819 (edward util))2021 (export make-buffer buffer->list buffer-length buffer-empty? buffer-ref22 buffer-append! buffer-remove! buffer-with-undo buffer-has-undo?23 buffer-undo! buffer-replace! buffer-join! buffer-move!)2425 (include "buffer/stack.scm"26 "buffer/srfi214-minimal.scm"27 "buffer/buffer.scm"))