mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-12 08:47:01 +00:00
replaced duplicate call with variable
This commit is contained in:
@@ -757,7 +757,7 @@ func displayResponse(content string, wordWrap bool, state *displayResponseState)
|
|||||||
// backtrack the length of the last word and clear to the end of the line
|
// backtrack the length of the last word and clear to the end of the line
|
||||||
a := runewidth.StringWidth(state.wordBuffer)
|
a := runewidth.StringWidth(state.wordBuffer)
|
||||||
if a > 0 {
|
if a > 0 {
|
||||||
fmt.Printf("\x1b[%dD", runewidth.StringWidth(state.wordBuffer))
|
fmt.Printf("\x1b[%dD", a)
|
||||||
}
|
}
|
||||||
fmt.Printf("\x1b[K\n")
|
fmt.Printf("\x1b[K\n")
|
||||||
fmt.Printf("%s%c", state.wordBuffer, ch)
|
fmt.Printf("%s%c", state.wordBuffer, ch)
|
||||||
|
|||||||
Reference in New Issue
Block a user