Skip to content

Commit c084718

Browse files
committed
Fix return type of AnnotatedString write
It should return an Int, the number of bytes written. However, this was forgotten when initially implementing it, and it returned nothing.
1 parent 180ab6c commit c084718

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/io.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,11 @@ escape_string(io::IO, s::Union{<:AnnotatedString, SubString{<:AnnotatedString}},
262262
function write(io::IO, c::AnnotatedChar)
263263
if get(io, :color, false) == true
264264
termstyle(io, getface(c), getface())
265-
print(io, c.char)
265+
bytes = write(io, c.char)
266266
termstyle(io, getface(), getface(c))
267+
bytes
267268
else
268-
print(io, c.char)
269+
write(io, c.char)
269270
end
270271
end
271272

0 commit comments

Comments
 (0)