diff --git a/src/text.c b/src/text.c index c9a5a923..bc30d5da 100644 --- a/src/text.c +++ b/src/text.c @@ -282,9 +282,9 @@ void indent_a_line(filestruct *line, char *indentation) openfile->totsize += indent_len; /* Compensate for the change in the current line. */ - if (line == openfile->mark) + if (line == openfile->mark && openfile->mark_x > 0) openfile->mark_x += indent_len; - if (line == openfile->current) { + if (line == openfile->current && openfile->current_x > 0) { openfile->current_x += indent_len; openfile->placewewant = xplustabs(); }