func countVisibleLines(v gtki.TextView) uint { lines := uint(1) iter := getTextBufferFrom(v).GetStartIter() for v.ForwardDisplayLine(iter) { lines++ } return lines }
func getTextBufferFrom(e gtki.TextView) gtki.TextBuffer { tb, _ := e.GetBuffer() return tb }