Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
799aa988
"encoding/vscode:/vscode.git/clone" did not exist on "ce461dae8d088253dcd9818d2999d4049bce3493"
Commit
799aa988
authored
May 15, 2024
by
Josh Yan
Browse files
go fmt'd cmd.go
parent
c9e584fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cmd/cmd.go
cmd/cmd.go
+3
-3
No files found.
cmd/cmd.go
View file @
799aa988
...
...
@@ -744,9 +744,9 @@ func displayResponse(content string, wordWrap bool, state *displayResponseState)
termWidth
,
_
,
_
:=
term
.
GetSize
(
int
(
os
.
Stdout
.
Fd
()))
if
wordWrap
&&
termWidth
>=
10
{
for
_
,
ch
:=
range
content
{
if
state
.
lineLength
+
1
>
termWidth
-
5
{
if
state
.
lineLength
+
1
>
termWidth
-
5
{
if
runewidth
.
StringWidth
(
state
.
wordBuffer
)
>
termWidth
-
10
{
if
runewidth
.
StringWidth
(
state
.
wordBuffer
)
>
termWidth
-
10
{
fmt
.
Printf
(
"%s%c"
,
state
.
wordBuffer
,
ch
)
state
.
wordBuffer
=
""
state
.
lineLength
=
0
...
...
@@ -765,7 +765,7 @@ func displayResponse(content string, wordWrap bool, state *displayResponseState)
if
runewidth
.
RuneWidth
(
ch
)
>=
2
{
state
.
wordBuffer
=
""
continue
}
}
switch
ch
{
case
' '
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment