Commit c9e584fb authored by Josh Yan's avatar Josh Yan
Browse files

updated double-width display

parent 17b1e81c
......@@ -745,6 +745,7 @@ func displayResponse(content string, wordWrap bool, state *displayResponseState)
if wordWrap && termWidth >= 10 {
for _, ch := range content {
if state.lineLength+1 > termWidth - 5 {
if runewidth.StringWidth(state.wordBuffer) > termWidth - 10 {
fmt.Printf("%s%c", state.wordBuffer, ch)
state.wordBuffer = ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment