code: func (eb *EditBox) AdjustVOffset(width int) {
  	ht := preferred_horizontal_threshold
  	max_h_threshold := (width - 1) / 2
  	if ht > max_h_threshold {
  		ht = max_h_threshold
  	}
  
  	threshold := width - 1
  	if eb.line_voffset != 0 {
  		threshold = width - ht
  	}
  	if eb.cursor_voffset-eb.line_voffset >= threshold {
  		eb.line_voffset = eb.cursor_voffset + (ht - width + 1)
  	}
  
  	if eb.line_voffset != 0 && eb.cursor_voffset-eb.line_voffset < ht {
  		eb.line_voffset = eb.cursor_voffset - ht
  		if eb.line_voffset < 0 {
  			eb.line_voffset = 0
  		}
  	}
  }
docs: // Adjusts line visual offset to a proper value depending on width