Comment 1 for bug 721982

Revision history for this message
Micah Cowan (micahcowan) wrote :

This patch fixes the graphical display glitch.

In some instances, it seems that when I type "/", it still may not show up in some circumstances, so that would be a separate and remaining bug that still needs looking to, but the history search itself consistently and correctly shows the lines immediately after the prompt, which is all I really cared about.

The patch is quite straightforward, as it simply replaces the static buffer with a dynamically allocated one, and expands it when it needs to be expanded.

Problems will still arise on systems that don't support vsnprintf, as bash will quite happily overflow the buffer (static or dynamic), but there's little I can do about that, short of a more invasive rewrite; and readline is full of cases like that anyway. Anyway, no such situation will arise in Debian or Ubuntu, or any modern system for that matter.