fix more find_paragraph() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
2101403824
Коммит
12090dd320
10
src/text.c
10
src/text.c
@ -1082,18 +1082,18 @@ bool find_paragraph(size_t *const quote, size_t *const par)
|
|||||||
/* Now current is the first line of the paragraph. Set quote_len to
|
/* Now current is the first line of the paragraph. Set quote_len to
|
||||||
* the quotation length of that line, and set par_len to the number
|
* the quotation length of that line, and set par_len to the number
|
||||||
* of lines in this paragraph. If, while calculating the latter, we
|
* of lines in this paragraph. If, while calculating the latter, we
|
||||||
* end up at the end of the last line of the file, and we were there
|
* end up past the beginning of the line, it means that we're at the
|
||||||
* before moving, it means that there aren't any paragraphs left, so
|
* last line of the file, and the file doesn't end in a newline. If
|
||||||
|
* we were there before moving, there aren't any paragraphs left, so
|
||||||
* get out. If we weren't there before moving, it means that the
|
* get out. If we weren't there before moving, it means that the
|
||||||
* line is part of the paragraph. */
|
* line is part of this paragraph. */
|
||||||
quote_len = quote_length(openfile->current->data);
|
quote_len = quote_length(openfile->current->data);
|
||||||
current_save = openfile->current;
|
current_save = openfile->current;
|
||||||
current_x_save = openfile->current_x;
|
current_x_save = openfile->current_x;
|
||||||
current_y_save = openfile->current_y;
|
current_y_save = openfile->current_y;
|
||||||
do_para_end(FALSE);
|
do_para_end(FALSE);
|
||||||
par_len = openfile->current->lineno - current_save->lineno;
|
par_len = openfile->current->lineno - current_save->lineno;
|
||||||
if (openfile->current == openfile->filebot && openfile->current_x ==
|
if (openfile->current_x > 0) {
|
||||||
strlen(openfile->current->data)) {
|
|
||||||
if (openfile->current == current_save &&
|
if (openfile->current == current_save &&
|
||||||
openfile->current_x == current_x_save)
|
openfile->current_x == current_x_save)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user