if (ISSET(SMART_HOME)) {
size_t current_x_save = current_x;
char *blank_mb = charalloc(mb_cur_max());
+ int blank_mb_len;
current_x = 0;
while (current->data[current_x] != '\0') {
- parse_mbchar(current->data + current_x, blank_mb
+ blank_mb_len = parse_mbchar(current->data + current_x,
+ blank_mb
#ifdef NANO_WIDE
, NULL
#endif
if (!is_blank_mbchar(blank_mb))
break;
- current_x = move_mbright(current->data, current_x);
+ current_x += blank_mb_len;
}
free(blank_mb);
size_t pww_save = placewewant;
const filestruct *current_save = current;
char *char_mb = charalloc(mb_cur_max());
+ int char_mb_len;
assert(current != NULL && current->data != NULL);
/* Skip letters in this word first. */
while (current->data[current_x] != '\0') {
- parse_mbchar(current->data + current_x, char_mb
+ char_mb_len = parse_mbchar(current->data + current_x,
+ char_mb
#ifdef NANO_WIDE
, NULL
#endif
if (!is_alnum_mbchar(char_mb))
break;
- current_x = move_mbright(current->data, current_x);
+ current_x += char_mb_len;
}
/* Go until we find the first letter of the next word. */
for (; current != NULL; current = current->next) {
while (current->data[current_x] != '\0') {
- parse_mbchar(current->data + current_x, char_mb
+ char_mb_len = parse_mbchar(current->data + current_x,
+ char_mb
#ifdef NANO_WIDE
, NULL
#endif
if (is_alnum_mbchar(char_mb))
break;
- current_x = move_mbright(current->data, current_x);
+ current_x += char_mb_len;
}
if (current->data[current_x] != '\0')
if (ISSET(SMART_HOME)) {
size_t statusbar_x_save = statusbar_x;
char *blank_mb = charalloc(mb_cur_max());
+ int blank_mb_len;
statusbar_x = 0;
while (statusbar_x < statusbar_xend) {
- parse_mbchar(answer + statusbar_x,
+ blank_mb_len = parse_mbchar(answer + statusbar_x,
blank_mb
#ifdef NANO_WIDE
, NULL
if (!is_blank_mbchar(blank_mb))
break;
- statusbar_x = move_mbright(answer, statusbar_x);
+ statusbar_x += blank_mb_len;
}
free(blank_mb);