Method: Textbringer::Buffer#copy_region

Defined in:
lib/textbringer/buffer.rb

#copy_region(s = @point, e = mark, append = false) ⇒ Object



917
918
919
920
921
922
923
924
925
# File 'lib/textbringer/buffer.rb', line 917

def copy_region(s = @point, e = mark, append = false)
  s, e = Buffer.region_boundaries(s, e)
  str = substring(s, e)
  if append && !KILL_RING.empty?
    KILL_RING.current.concat(str)
  else
    KILL_RING.push(str)
  end
end