aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/lineedit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index b3f16cd9d..b168f1b86 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1774,7 +1774,7 @@ static void parse_and_put_prompt(const char *prmt_ptr)
1774 const char *p; 1774 const char *p;
1775 cmdedit_prompt = prmt_ptr; 1775 cmdedit_prompt = prmt_ptr;
1776 p = strrchr(prmt_ptr, '\n'); 1776 p = strrchr(prmt_ptr, '\n');
1777 cmdedit_prmt_len = unicode_strlen(p ? p+1 : prmt_ptr); 1777 cmdedit_prmt_len = unicode_strwidth(p ? p+1 : prmt_ptr);
1778 put_prompt(); 1778 put_prompt();
1779} 1779}
1780#else 1780#else
@@ -1943,7 +1943,7 @@ static void parse_and_put_prompt(const char *prmt_ptr)
1943#if 0 /*ENABLE_UNICODE_SUPPORT*/ 1943#if 0 /*ENABLE_UNICODE_SUPPORT*/
1944/* Won't work, pbuf is one BYTE string here instead of an one Unicode char string. */ 1944/* Won't work, pbuf is one BYTE string here instead of an one Unicode char string. */
1945/* FIXME */ 1945/* FIXME */
1946 cmdedit_prmt_len += unicode_strlen(pbuf); 1946 cmdedit_prmt_len += unicode_strwidth(pbuf);
1947#else 1947#else
1948 cmdedit_prmt_len += n; 1948 cmdedit_prmt_len += n;
1949#endif 1949#endif
@@ -2202,7 +2202,7 @@ static int32_t reverse_i_search(void)
2202 free((char*)cmdedit_prompt); 2202 free((char*)cmdedit_prompt);
2203 set_prompt: 2203 set_prompt:
2204 cmdedit_prompt = xasprintf("(reverse-i-search)'%s': ", match_buf); 2204 cmdedit_prompt = xasprintf("(reverse-i-search)'%s': ", match_buf);
2205 cmdedit_prmt_len = unicode_strlen(cmdedit_prompt); 2205 cmdedit_prmt_len = unicode_strwidth(cmdedit_prompt);
2206 goto do_redraw; 2206 goto do_redraw;
2207 } 2207 }
2208 } 2208 }