Okay, now fix do_prev_word so it doesn't crash when it hits a blank line, it's still not perfect =/

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@884 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2001-10-24 18:07:58 +00:00
parent a1a6a7fda6
commit e59fc829d8

4
nano.c
View File

@ -840,7 +840,7 @@ void do_prev_word(void)
if (i == 0) { if (i == 0) {
if (fileptr->prev != NULL) if (fileptr->prev != NULL)
i = strlen(fileptr->prev->data) - 1; i = strlen(fileptr->prev->data);
else if (fileptr == fileage && filebot != NULL) { else if (fileptr == fileage && filebot != NULL) {
current_x = 0; current_x = 0;
return; return;
@ -864,7 +864,7 @@ void do_prev_word(void)
} }
if (fileptr->prev != NULL) if (fileptr->prev != NULL)
i = strlen(fileptr->prev->data) - 1; i = strlen(fileptr->prev->data);
else if (fileptr == fileage && filebot != NULL) { else if (fileptr == fileage && filebot != NULL) {
current_x = 0; current_x = 0;
return; return;