From cd3348bf49444dfed5f37953fdabd064874edd8b Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Fri, 24 Feb 2017 17:13:48 -0500 Subject: [PATCH] fixed selection bug when running a reverse selection through an external command --- TODO.md | 1 - lib/view.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index e6f8dff..f2da016 100644 --- a/TODO.md +++ b/TODO.md @@ -2,7 +2,6 @@ Up Next: -* reverse selections passed to commands do not have results highlighted properly * check for file changes on save * check for file changes when window regains focus * Right click in tags region should search edit region diff --git a/lib/view.c b/lib/view.c index be6dc24..d43de7b 100644 --- a/lib/view.c +++ b/lib/view.c @@ -482,6 +482,7 @@ void view_redo(View* view) { } void view_putstr(View* view, char* str) { + selswap(&(view->selection)); unsigned beg = view->selection.beg; buf_loglock(&(view->buffer)); while (*str) { -- 2.51.0