only when it contains a multicolumn character, to spare all regular
text this significant slowdown. This fixes Savannah bug #45684
reported by Wyatt Ward.
+ * src/move.c (do_prev_word): Drop a return value that is never used.
2015-09-04 Benno Schulenberg <bensberg@justemail.net>
* src/chars.c: Reverting r5354 from August 12. This fixes Savannah
/* Move to the previous word in the file. If allow_punct is TRUE, treat
* punctuation as part of a word. If allow_update is TRUE, update the
- * screen afterwards. Return TRUE if we started on a word, and FALSE
- * otherwise. */
-bool do_prev_word(bool allow_punct, bool allow_update)
+ * screen afterwards. */
+void do_prev_word(bool allow_punct, bool allow_update)
{
size_t pww_save = openfile->placewewant;
filestruct *current_save = openfile->current;
char *char_mb;
int char_mb_len;
- bool begin_line = FALSE, started_on_word = FALSE;
+ bool begin_line = FALSE;
assert(openfile->current != NULL && openfile->current->data != NULL);
if (!is_word_mbchar(char_mb, allow_punct))
break;
- /* If we haven't found it, then we've started on a word, so set
- * started_on_word to TRUE. */
- started_on_word = TRUE;
-
if (openfile->current_x == 0)
begin_line = TRUE;
else
/* If allow_update is TRUE, update the screen. */
if (allow_update)
edit_redraw(current_save, pww_save);
-
- /* Return whether we started on a word. */
- return started_on_word;
}
/* Move to the previous word in the file, treating punctuation as part
#ifndef NANO_TINY
bool do_next_word(bool allow_punct, bool allow_update);
void do_next_word_void(void);
-bool do_prev_word(bool allow_punct, bool allow_update);
+void do_prev_word(bool allow_punct, bool allow_update);
void do_prev_word_void(void);
#endif
void do_home(void);