nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 7a038adfd47809cdf247aeb09ee4c8308cfb033c
parent f1b5be4bbf229dadc07db62609ce9ad0ba00a0f9
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue,  6 Feb 2018 21:09:52 -0600

input: don't stop prepending when the user adds text via a shortcut

When characters are added via Verbatim Input or by pressing <Tab>,
the prepend flag should be retained, just like when characters are
typed directly.

This fixes https://savannah.gnu.org/bugs/?52956.

Diffstat:
Msrc/nano.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1772,8 +1772,10 @@ int do_input(bool allow_funcs) } #endif #ifdef ENABLE_WRAPPING - /* If the cursor moved to another line, clear the prepend flag. */ - if (openfile->current->next != was_next) + /* If the cursor moved to another line and this was not caused + * by adding characters to the buffer, clear the prepend flag. */ + if (openfile->current->next != was_next && + s->scfunc != do_tab && s->scfunc != do_verbatim_input) wrap_reset(); #endif #ifdef ENABLE_COLOR