*really* fix the previous break_line() problem

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-09-20 17:47:27 +00:00
parent bdc1b9b568
commit ca37ee67d9
1 changed files with 2 additions and 3 deletions

View File

@ -575,10 +575,9 @@ ssize_t break_line(const char *line, ssize_t goal, bool newline)
assert(line != NULL);
while (*line != '\0' && goal >= 0) {
int pos;
size_t pos = 0;
line_len = parse_mbchar(line, NULL, NULL);
pos = mbwidth(line);
line_len = parse_mbchar(line, NULL, &pos);
if (is_blank_mbchar(line) || (newline && *line == '\n')) {
blank_loc = cur_loc;