2009-08-19 Chris Allegretta <chrisa@asty.org>
* Fix issue with soft wrapping not displaying the last character of each line, fixed bug discovered by Hannes <mr_creosote@mutantwatch.de>. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4404 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
308a7b029d
Коммит
3de025f8f4
@ -1,3 +1,7 @@
|
||||
2009-08-19 Chris Allegretta <chrisa@asty.org>
|
||||
* Fix issue with soft wrapping not displaying the last character of each line,
|
||||
fixed bug discovered by Hannes <mr_creosote@mutantwatch.de>.
|
||||
|
||||
2009-08-17 Mike Frysinger <vapier@gentoo.org>
|
||||
* doc/syntax/(gentoo|sh|tcl).nanorc: Fix problems with empty regexes on POSIX.
|
||||
Fixes Savannah bug 27175.
|
||||
|
@ -2440,11 +2440,11 @@ void reset_cursor(void)
|
||||
openfile->current_y = 0;
|
||||
filestruct *tmp;
|
||||
for (tmp = openfile->edittop; tmp != openfile->current; tmp = tmp->next)
|
||||
openfile->current_y += 1 + strlenpt(tmp->data) / COLS;
|
||||
openfile->current_y += 1 + strlenpt(tmp->data) / (COLS - 1);
|
||||
|
||||
openfile->current_y += xplustabs() / COLS;
|
||||
openfile->current_y += xplustabs() / (COLS - 1);
|
||||
if (openfile->current_y < editwinrows)
|
||||
wmove(edit, openfile->current_y, xpt % COLS);
|
||||
wmove(edit, openfile->current_y, xpt % (COLS - 1));
|
||||
} else {
|
||||
openfile->current_y = openfile->current->lineno -
|
||||
openfile->edittop->lineno;
|
||||
@ -2884,7 +2884,7 @@ int update_line(filestruct *fileptr, size_t index)
|
||||
mvwaddch(edit, line, COLS - 1, '$');
|
||||
} else {
|
||||
int full_length = strlenpt(fileptr->data);
|
||||
for (index += COLS; index < full_length && line < editwinrows; index += COLS) {
|
||||
for (index += COLS - 1; index < full_length && line < editwinrows; index += COLS - 1) {
|
||||
line++;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "update_line(): Softwrap code, moving to %d\n", line);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user