From ead0f6cfe96f258830350a0b91fe0741268b808d Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 19 Mar 2018 23:37:12 -0400 Subject: [PATCH] removed outpoint logic --- inc/edit.h | 11 ----------- lib/buf.c | 3 --- 2 files changed, 14 deletions(-) diff --git a/inc/edit.h b/inc/edit.h index b36232a..e17ec0a 100644 --- a/inc/edit.h +++ b/inc/edit.h @@ -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 */ diff --git a/lib/buf.c b/lib/buf.c index af99ee9..e771754 100644 --- 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; -- 2.49.0