Commit 1b525e9a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

switch test around in do_prev_word() for consistency with do_next_word()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 4 deletions
+8 -4
...@@ -91,6 +91,10 @@ CVS code - ...@@ -91,6 +91,10 @@ CVS code -
during wait() and can then call cancel_fork() properly. (DLR) during wait() and can then call cancel_fork() properly. (DLR)
do_delete() do_delete()
- Tweak for efficiency. (David Benbennick) - Tweak for efficiency. (David Benbennick)
do_prev_word()
- Switch the last test (current != NULL or not) around to match
the order of the same test in do_next_word() (current ==
NULL). The results are the same either way. (DLR)
do_spell() do_spell()
- Tweak for efficiency. (David Benbennick) - Tweak for efficiency. (David Benbennick)
- Change the statusbar entries used in cases of failure so that - Change the statusbar entries used in cases of failure so that
......
...@@ -1200,12 +1200,12 @@ int do_prev_word(void) ...@@ -1200,12 +1200,12 @@ int do_prev_word(void)
current_x = strlen(current->prev->data); current_x = strlen(current->prev->data);
} }
if (current != NULL) { if (current == NULL) {
while (current_x > 0 && isalnum((int)current->data[current_x - 1]))
current_x--;
} else {
current = fileage; current = fileage;
current_x = 0; current_x = 0;
} else {
while (current_x > 0 && isalnum((int)current->data[current_x - 1]))
current_x--;
} }
placewewant = xplustabs(); placewewant = xplustabs();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment