Drawstring anomoly

I am writing text to a Canvas… this is a trimmed down version (the full version has color logic in it)

x=10
y=g.textascent
for i=0 to lines.ubound
  if y>=g.height then exit for
  // determine line colors
 w=g.width-1
s=lines(i)
g.drawstring s,x,y,w,False
y=y+g.textheight
next i

SOMETIMES if the size of the graphic area is slightly larger than a multiple of textheight the last line of text seems to wrap, and print over itself…
if I drag the window just a tad, it “fixes” itself. But the drawstring should not exceed one line regardless

If I change FALSE to true, it does not wrap, but also draws “…” where I want the line to clip

Solved… it had to do with the fact that the string had TAB (chrb(9)) embedded… once those were expanded to 4 spaces it worked out just right

you are correct… and the reason I only saw it on the last line was the previous lines cleared their background first…