[SERVER-14931] linenoise incorrectly duplicates lines containing multi-byte characters, when text wraps Created: 18/Aug/14  Updated: 31/Jul/15  Resolved: 05/Sep/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.4.9, 2.6.4, 2.7.5
Fix Version/s: 2.7.7

Type: Bug Priority: Minor - P4
Reporter: yeaji shin Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: community-team, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-6086 Unicode/UTF-8 in the shell needs to h... Closed
Related
is related to SERVER-14741 linenoise does not erase characters a... Backlog
Tested
Operating System: ALL
Sprint: Server 2.7.4, Server 2.7.5, Server 2.7.6
Participants:

 Description   

if there are no multi-byte at first line, didn't comes up. but have multi-byte characters (more than 2 characters) always did.

eg)
> aaaaa가나다aaaaa|(end of shell)
aa
when I write next "a", should be
> aaaaa가나다aaaaa|(end of shell)
aaa
but
> aaaaa가나다aaaaa|(end of shell)
aaaaaaa가나다aaaaa|(end of shell)
aaa



 Comments   
Comment by Githook User [ 05/Sep/14 ]

Author:

{u'username': u'Bloodevil', u'name': u'yeaji.shin', u'email': u'bloodevil4@gmail.com'}

Message: SERVER-14931 fixed current command shell command length to take into account multi-byte characters

Closes #765

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/4f7344088e603ae9e09c4edeabaa7930a3722dc4

Comment by Ramon Fernandez Marina [ 03/Sep/14 ]

Thanks for your report bloodevil, I'm able to reproduce the behavior you describe. In 2.7.5 one needs at least two multi-byte characters in the input for the problem to appear, while in 2.6.4 one is sufficient.

Regards,
Ramón.

Comment by yeaji shin [ 22/Aug/14 ]

Hi Thomas Rueckstiess,

I tested in 2.4.9 and github master latest version.

1. please change your terminal width 20 (no matter width but more easily)
2. write down aaaaaaaaaaaaa가가aaaaa|(end of the line)
3. then you can see like below
> aaaaaaaaaaaaa가가aaaaa|(end of the line)
4. after then write more on next line
> aaaaaaaaaaaaa가가aaaaa|(end of the line)
aaa
5. then you can see incorrectly duplicates lines.

I tested on ubuntu 14.04 mongodb, shell version 2.4.9 and master latest version.
if you can't reproduce again, please tell me. I'll record.

Comment by Thomas Rueckstiess [ 18/Aug/14 ]

Hi bloodevil,

I can't reproduce the behavior you describe.

Can you please give me step-by-step instructions to see the issue?
Can you also let me know what version you're using?

Thanks,
Thomas

Generated at Thu Feb 08 03:36:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.