lineedit: fix column display for wide and combining chars in TAB completion
function old new delta unicode_strwidth - 20 +20 read_line_input 4945 4953 +8 unicode_strlen 31 - -31 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 28/-31) Total: -3 bytes Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
39a04f71ca
commit
11bcf4b224
3 changed files with 25 additions and 7 deletions
|
@ -23,7 +23,8 @@ enum {
|
|||
|
||||
#if !ENABLE_UNICODE_SUPPORT
|
||||
|
||||
# define unicode_strlen(string) strlen(string)
|
||||
# define unicode_strlen(string) strlen(string)
|
||||
# define unicode_strwidth(string) strlen(string)
|
||||
# define unicode_status UNICODE_OFF
|
||||
# define init_unicode() ((void)0)
|
||||
|
||||
|
@ -49,7 +50,10 @@ enum {
|
|||
# define ENABLE_UNICODE_BIDI_SUPPORT 0
|
||||
# endif
|
||||
|
||||
/* Number of unicode chars. Falls back to strlen() on invalid unicode */
|
||||
size_t FAST_FUNC unicode_strlen(const char *string);
|
||||
/* Width on terminal */
|
||||
size_t FAST_FUNC unicode_strwidth(const char *string);
|
||||
enum {
|
||||
UNI_FLAG_PAD = (1 << 0),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue