[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] [PATCH] multiline with wide character doubling last char
From: |
Martin Hamrle |
Subject: |
[Bug-readline] [PATCH] multiline with wide character doubling last char |
Date: |
Sun, 2 Aug 2009 19:52:19 +0200 |
Hi,
I have found a bug in readline when handling multiline with wide characters.
This bug could be reproduced.
Type into line wide character(2 byte) and two another ascii
character(1 byte) for example "á12". Now if you prepend any ascii
characters (for example 'k') as many as the wide character reach
beginning of second line, the last character is doubled, it is printed
two times. If you press Ctrl-l the redraw is successfull. The last
character is not doubled.
start:
|á12 |
after prepending several 'k', the buggy result is:
|kkkkkkk|
|á122 |
instead of
|kkkkkkk|
|á12 |
Attached patch fixes this problem.
There is a problem in function update_line. In case where wide
character is at the beginning of new line and is not at the beginning
of old line, data of old line is moved and first character from new
line is copied into the old line. Problem is that there is no
modification of indices referencing moved data.
I am using readline 6.0 on ubuntu karmic(i386).
Martin Hamrle
patch.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-readline] [PATCH] multiline with wide character doubling last char,
Martin Hamrle <=