Maybe addLine should return the number of lines the string was split to.
Edit:
Either that or internally map the text widgets to lines and use that in getLine and removeLine instead of literal line numbers.
Line numbers in Notepad++ with word wrap enabled are like this.
The actual lines are not counted, just the newline character is counted.
For example, when getLine is called, a map looks up a list of text widgets depending on the index.
The text of those widgets is then recombined and returned.
I think that even though getLine and removeLine would be changed, that setLineLimit should remain the same.
At least, setLineLimit would be the same from the user's point of view (counting actual lines on the screen).
Eh... now that I think about it, that'd just be confusing.