# File lib/rbreadline.rb, line 4899 def rl_delete_text(from, to) # Fix it if the caller is confused. if (from > to) from,to = to,from end # fix boundaries if (to > @rl_end) to = @rl_end if (from > to) from = to end end if (from < 0) from = 0 end text = rl_copy_text(from, to) diff = to - from @rl_line_buffer[from...to] = '' @rl_line_buffer << 0.chr * diff # Remember how to undo this delete. if (!@_rl_doing_an_undo) rl_add_undo(UNDO_DELETE, from, to, text) else text = nil end @rl_end -= diff @rl_line_buffer[@rl_end,1] = 0.chr return (diff) end