ledit

Text editor (WIP)
git clone git://lumidify.org/ledit.git (fast, but not encrypted)
git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
Log | Files | Refs | README | LICENSE

commit da472f5508527b1221e1365fa152e2171e877897
parent 02ae9ed18f041d4aecaada781fa5185918cc09ec
Author: lumidify <nobody@lumidify.org>
Date:   Sun, 26 Dec 2021 16:30:41 +0100

And another small clarification (+ a small bugfix)

Diffstat:
Mledit.1 | 3+++
Mview.c | 3+++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ledit.1 b/ledit.1 @@ -811,6 +811,9 @@ Note that text selection currently does not work in the line editor because the author is too lazy to implement that. .Pp Middle click in insert mode pastes the current X11 primary clipboard. +Note that the text is pasted at the current cursor position, not the +position of the mouse cursor. +The author prefers this way. .Sh CONFIGURATION .Nm currently has to be configured entirely by changing header files and diff --git a/view.c b/view.c @@ -1992,6 +1992,8 @@ view_redo(ledit_view *view, int num) { } } +/* FIXME: this could give weird results if the paste occurs in multiple + chunks and something else happens inbetween */ static void paste_callback(void *data, char *text, size_t len) { ledit_view *view = (ledit_view *)data; @@ -2003,6 +2005,7 @@ paste_callback(void *data, char *text, size_t len) { view->cur_line, view->cur_index, text, len, &view->cur_line, &view->cur_index ); + view_ensure_cursor_shown(view); } /* FIXME: guard against view being destroyed before paste callback is nulled */