]> git.mdlowis.com Git - projs/tide.git/commitdiff
removed outpoint logic
authorMichael D. Lowis <mike@mdlowis.com>
Tue, 20 Mar 2018 03:37:12 +0000 (23:37 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Tue, 20 Mar 2018 03:37:12 +0000 (23:37 -0400)
inc/edit.h
lib/buf.c

index b36232a1099bc0901405c9d45f921809277ad809..e17ec0aa2590a48d66728b6a987b239cebc38e85 100644 (file)
@@ -70,7 +70,6 @@ typedef struct {
     uint transid;         /* tracks the last used transaction id for log entries */
     void (*errfn)(char*); /* callback for error messages */
     size_t nlines;        /* tracks number of lines in the buffer */
-    size_t outpoint;      /* tracks the point separating output from input for command buffers */
 } Buf;
 
 /* cursor/selection representation */
@@ -231,16 +230,6 @@ void exec_job(char** cmd, char* data, size_t ndata, View* dest);
 int exec_cmd(char** cmd);
 int exec_spawn(char** cmd, int* in, int* out);
 
-/* Pseudo-Terminal Handling
- *****************************************************************************/
-bool pty_active(void);
-void pty_spawn(char** argv);
-void pty_send(char* cmd, char* arg);
-void pty_send_rune(Rune rune);
-void pty_send_intr(void);
-void pty_send_eof(void);
-void pty_send_susp(void);
-
 /* Configuration Data
  *****************************************************************************/
 enum { /* Configuration Variables */
index af99ee95cbfa75edab1f71d6356c1d66ad3e6f06..e7717547498333ef4a37ea9c52890d602235a52b 100644 (file)
--- a/lib/buf.c
+++ b/lib/buf.c
@@ -43,7 +43,6 @@ void buf_init(Buf* buf, void (*errfn)(char*)) {
     buf->redo        = NULL;
     buf->errfn       = errfn;
     buf->nlines      = 0;
-    buf->outpoint    = 0;
     assert(buf->bufstart);
 }
 
@@ -540,7 +539,6 @@ static void buf_resize(Buf* buf, size_t sz) {
 
 static void delete(Buf* buf, size_t off) {
     Rune rune = buf_get(buf, off);
-    if (off < buf->outpoint) buf->outpoint--;
     if (rune == RUNE_CRLF || rune == '\n')
         buf->nlines--;
     syncgap(buf, off);
@@ -550,7 +548,6 @@ static void delete(Buf* buf, size_t off) {
 static size_t insert(Buf* buf, size_t off, Rune rune) {
     size_t rcount = 1;
     syncgap(buf, off);
-    if (off < buf->outpoint) buf->outpoint++;
     if (rune == '\n' || rune == RUNE_CRLF) buf->nlines++;
     if (buf->crlf && rune == '\n' && buf_get(buf, off-1) == '\r') {
         rcount = 0;