module RbReadline

Public Class Methods

puts(msg) click to toggle source
# File lib/roby/app/scripts/shell.rb, line 59
def self.puts(msg)
    if needs_save_and_restore = rl_isstate(RL_STATE_READCMD)
        saved_point = rl_point
        rl_maybe_save_line
        rl_save_prompt
        rl_kill_full_line(nil, nil)
        rl_redisplay
    end

    Kernel.puts msg

    if needs_save_and_restore
        rl_restore_prompt
        rl_maybe_replace_line
        @rl_point = saved_point
        rl_redisplay
    end
end