]> git.wh0rd.org Git - nano.git/commitdiff
Okay, now fix do_prev_word so it doesn't crash when it hits a blank line, it's still...
authorChris Allegretta <chrisa@asty.org>
Wed, 24 Oct 2001 18:07:58 +0000 (18:07 +0000)
committerChris Allegretta <chrisa@asty.org>
Wed, 24 Oct 2001 18:07:58 +0000 (18:07 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@884 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

nano.c

diff --git a/nano.c b/nano.c
index 80685d7d55a4b9a838156ab416f107b648a94a67..0f520c1dcf7d5b2f4049b24127e53b3d0a80e6f5 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -840,7 +840,7 @@ void do_prev_word(void)
 
            if (i == 0) {
                if (fileptr->prev != NULL)
-                   i = strlen(fileptr->prev->data) - 1;
+                   i = strlen(fileptr->prev->data);
                else if (fileptr == fileage && filebot != NULL) {
                    current_x = 0;
                    return;
@@ -864,7 +864,7 @@ void do_prev_word(void)
 
        }
        if (fileptr->prev != NULL)
-           i = strlen(fileptr->prev->data) - 1;
+           i = strlen(fileptr->prev->data);
        else if (fileptr == fileage && filebot != NULL) {
            current_x = 0;
            return;