nano

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

commit 9e73d98a60400e7fa03f96c0ad657de41c624042
parent eb4f90e182e1ecbd0d3a719bea4669779c1d4b56
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri,  5 May 2006 15:20:36 +0000

better handle position shifting when indenting marked text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

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

diff --git a/src/text.c b/src/text.c @@ -316,10 +316,12 @@ void do_indent_marked(ssize_t cols) openfile->totsize += line_indent_len; /* Keep track of the change in the current line. */ - if (f == openfile->mark_begin) + if (f == openfile->mark_begin && openfile->mark_begin_x >= + indent_len) openfile->mark_begin_x += line_indent_len; - if (f == openfile->current) + if (f == openfile->current && openfile->current_x >= + indent_len) openfile->current_x += line_indent_len; /* If the NO_NEWLINES flag isn't set, and this is the