fix more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3132 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
9bedc4b71c
Коммит
5455b6af46
16
src/text.c
16
src/text.c
@ -1370,21 +1370,23 @@ void do_justify(bool full_justify)
|
|||||||
/* Break the current line. */
|
/* Break the current line. */
|
||||||
null_at(&openfile->current->data, break_pos);
|
null_at(&openfile->current->data, break_pos);
|
||||||
|
|
||||||
|
/* If the current line is the last line of the file, move
|
||||||
|
* the last line of the file down. */
|
||||||
|
if (openfile->filebot == openfile->current)
|
||||||
|
openfile->filebot = openfile->filebot->next;
|
||||||
|
|
||||||
/* Go to the next line. */
|
/* Go to the next line. */
|
||||||
par_len--;
|
par_len--;
|
||||||
if (openfile->current != openfile->filebot) {
|
openfile->current_y++;
|
||||||
openfile->current_y++;
|
openfile->current = openfile->current->next;
|
||||||
openfile->current = openfile->current->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We're done breaking lines, so we don't need indent_string
|
/* We're done breaking lines, so we don't need indent_string
|
||||||
* anymore. */
|
* anymore. */
|
||||||
free(indent_string);
|
free(indent_string);
|
||||||
|
|
||||||
/* Go to the next line: the line after the last line of the
|
/* Go to the next line, if possible. If there is no next line,
|
||||||
* paragraph, if any. If there isn't one, move to the end of
|
* move to the end of the current line. */
|
||||||
* the current line, since that's where the paragraph ends. */
|
|
||||||
if (openfile->current != openfile->filebot) {
|
if (openfile->current != openfile->filebot) {
|
||||||
openfile->current_y++;
|
openfile->current_y++;
|
||||||
openfile->current = openfile->current->next;
|
openfile->current = openfile->current->next;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user