mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-16 05:14:43 +03:00
fix still more do_indent_marked() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3457 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
2e8fac6487
commit
7194a617c4
14
src/text.c
14
src/text.c
@ -279,13 +279,14 @@ void do_indent_marked(ssize_t len)
|
||||
openfile->totsize -= indent_len;
|
||||
|
||||
/* Keep track of the change in the current line. */
|
||||
if (f == openfile->current)
|
||||
openfile->current_x -= indent_len;
|
||||
|
||||
if (f == openfile->mark_begin &&
|
||||
openfile->mark_begin_x >= indent_len)
|
||||
openfile->mark_begin_x -= indent_len;
|
||||
|
||||
if (f == openfile->current && openfile->current_x >=
|
||||
indent_len)
|
||||
openfile->current_x -= indent_len;
|
||||
|
||||
/* We've unindented, so set indent_changed to TRUE. */
|
||||
if (!indent_changed)
|
||||
indent_changed = TRUE;
|
||||
@ -300,12 +301,13 @@ void do_indent_marked(ssize_t len)
|
||||
openfile->totsize += line_indent_len;
|
||||
|
||||
/* Keep track of the change in the current line. */
|
||||
if (f == openfile->mark_begin && openfile->current_x <
|
||||
openfile->mark_begin_x)
|
||||
openfile->mark_begin_x += line_indent_len;
|
||||
|
||||
if (f == openfile->current)
|
||||
openfile->current_x += line_indent_len;
|
||||
|
||||
if (f == openfile->mark_begin)
|
||||
openfile->mark_begin_x += line_indent_len;
|
||||
|
||||
/* If the NO_NEWLINES flag isn't set, and this is the
|
||||
* magicline, add a new magicline. */
|
||||
if (!ISSET(NO_NEWLINES) && f == openfile->filebot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user