tweak do_para_end() to remove the assumption that the file always ends
in a magicline git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3123 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
32bd29e3cc
commit
31d7b3667c
|
@ -40,8 +40,8 @@ CVS code -
|
|||
- Tweak a few functions to remove the assumption that the file
|
||||
always ends in a magicline. Changes to cut_line(),
|
||||
do_cut_till_end(), open_buffer(), read_file(), write_file(),
|
||||
do_last_line(), do_alt_speller(), and do_wordlinechar_count().
|
||||
(DLR)
|
||||
do_last_line(), do_para_end(), do_alt_speller(), and
|
||||
do_wordlinechar_count(). (DLR)
|
||||
- Tweak a few functions to rely on fileage and filebot instead
|
||||
of NULL for their checks to detect the top or bottom of the
|
||||
file. Changes to cut_line(), cut_to_eol(), do_page_up(),
|
||||
|
|
17
src/move.c
17
src/move.c
|
@ -148,9 +148,6 @@ void do_para_begin(bool allow_update)
|
|||
|
||||
check_statusblank();
|
||||
|
||||
openfile->current_x = 0;
|
||||
openfile->placewewant = 0;
|
||||
|
||||
if (openfile->current != openfile->fileage) {
|
||||
do {
|
||||
openfile->current = openfile->current->prev;
|
||||
|
@ -158,6 +155,9 @@ void do_para_begin(bool allow_update)
|
|||
} while (!begpar(openfile->current));
|
||||
}
|
||||
|
||||
openfile->current_x = 0;
|
||||
openfile->placewewant = 0;
|
||||
|
||||
if (allow_update)
|
||||
edit_redraw(current_save, pww_save);
|
||||
}
|
||||
|
@ -178,9 +178,6 @@ void do_para_end(bool allow_update)
|
|||
|
||||
check_statusblank();
|
||||
|
||||
openfile->current_x = 0;
|
||||
openfile->placewewant = 0;
|
||||
|
||||
while (openfile->current != openfile->filebot &&
|
||||
!inpar(openfile->current))
|
||||
openfile->current = openfile->current->next;
|
||||
|
@ -192,8 +189,14 @@ void do_para_end(bool allow_update)
|
|||
openfile->current_y++;
|
||||
}
|
||||
|
||||
if (openfile->current != openfile->filebot)
|
||||
if (openfile->current != openfile->filebot) {
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current_x = 0;
|
||||
openfile->placewewant = 0;
|
||||
} else {
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
|
||||
if (allow_update)
|
||||
edit_redraw(current_save, pww_save);
|
||||
|
|
Loading…
Reference in New Issue