X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/05f619c271e3e78e20c66eee1f1dbbf1a4492e26..e7ff015817107dbac9373c19ce851178e4f3c791:/Display.cpp?ds=sidebyside diff --git a/Display.cpp b/Display.cpp index 402e717..bd646bb 100644 --- a/Display.cpp +++ b/Display.cpp @@ -116,14 +116,10 @@ void CYDisplayMove(CYCursor target) { current_ = target; } -void CYDisplayStart(int meta) { - rl_prep_terminal(meta); - current_ = CYCursor(); -} - void CYDisplayUpdate() { rl_display_fixed = 1; rl_redisplay(); + current_ = CYCursor(_rl_last_v_pos, _rl_last_c_pos); #if RL_READLINE_VERSION >= 0x0600 const char *prompt(rl_display_prompt); @@ -148,8 +144,6 @@ void CYDisplayUpdate() { CYCursor target(CYDisplayOutput(putchar, width, stream.str().c_str(), rl_point)); _rl_vis_botlin = current_.real(); - _rl_last_c_pos = current_.imag(); - _rl_last_v_pos = target.real(); if (current_.imag() == 0) CYDisplayOutput(putchar, width, " "); @@ -158,12 +152,11 @@ void CYDisplayUpdate() { CYDisplayMove(target); fflush(stdout); + _rl_last_v_pos = current_.real(); + _rl_last_c_pos = current_.imag(); + width_ = width; point_ = rl_point; } -void CYDisplayFinish() { - rl_deprep_terminal(); -} - #endif