bash-custom-action/readline-6.0-promptlen-screenwidth.patch

31 lines
1.2 KiB
Diff

*** display.c
--- display.c 2009-04-25 21:42:18.000000000 -0400
***************
*** 1893,1896 ****
--- 1895,1902 ----
woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
cpos = _rl_last_c_pos;
+
+ if (cpos == 0 && cpos == new)
+ return;
+
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
***************
*** 1906,1912 ****
desired display position. */
if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
! (prompt_physical_chars > _rl_screenwidth &&
_rl_last_v_pos == prompt_last_screen_line &&
! wrap_offset >= woff &&
new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
/* XXX last comparison might need to be >= */
--- 1912,1918 ----
desired display position. */
if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
! (prompt_physical_chars >= _rl_screenwidth &&
_rl_last_v_pos == prompt_last_screen_line &&
! wrap_offset >= woff && dpos >= woff &&
new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
/* XXX last comparison might need to be >= */