SERVER-14931 linenoise incorrectly duplicates lines containing multi-byte characters, when text wraps

whenever enter the character on mongodb shell, didn't recalculated the length.
There no problem write in only single byte but write multibyte characters on shell, not matched length and width.

for example. shell total width is 30. then I can write 30 characters of single byte character. but if I can use multibyte like "Korean" I reach out the end of shell only 15 characters. So I should recalculate whenever someone write the character.
please ignore my last comment.

Would it make sense to calculate the screen length in a local variable 'displayLength' before line 2420 and replace 'len' with 'displayLength' in lines 2420 to 2422?