* wordproc.c (line_start): Remove incorrect optimization abusing
static varaibles. Internal formatting should be usable now.
Этот коммит содержится в:
родитель
69dd1ca00c
Коммит
7f072959a4
@ -1,3 +1,8 @@
|
|||||||
|
2002-10-20 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* wordproc.c (line_start): Remove incorrect optimization abusing
|
||||||
|
static varaibles. Internal formatting should be usable now.
|
||||||
|
|
||||||
2002-10-18 Pavel Roskin <proski@gnu.org>
|
2002-10-18 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* wordproc.c (begin_paragraph): Fix the same off-by-one error as
|
* wordproc.c (begin_paragraph): Fix the same off-by-one error as
|
||||||
|
@ -27,21 +27,21 @@ int line_is_blank (WEdit * edit, long line);
|
|||||||
|
|
||||||
#define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
|
#define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
|
||||||
|
|
||||||
static long line_start (WEdit * edit, long line)
|
static long
|
||||||
|
line_start (WEdit *edit, long line)
|
||||||
{
|
{
|
||||||
static long p = -1, l = 0;
|
long p, l;
|
||||||
int c;
|
|
||||||
if (p == -1 || abs (l - line) > abs (edit->curs_line - line)) {
|
l = edit->curs_line;
|
||||||
l = edit->curs_line;
|
p = edit->curs1;
|
||||||
p = edit->curs1;
|
|
||||||
}
|
|
||||||
if (line < l)
|
if (line < l)
|
||||||
p = edit_move_backward (edit, p, l - line);
|
p = edit_move_backward (edit, p, l - line);
|
||||||
else if (line > l)
|
else if (line > l)
|
||||||
p = edit_move_forward (edit, p, line - l, 0);
|
p = edit_move_forward (edit, p, line - l, 0);
|
||||||
l = line;
|
|
||||||
p = edit_bol (edit, p);
|
p = edit_bol (edit, p);
|
||||||
while (strchr ("\t ", c = edit_get_byte (edit, p)))
|
while (strchr ("\t ", edit_get_byte (edit, p)))
|
||||||
p++;
|
p++;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user