You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of readline implements the redisplay function, but not the forced version. This patch maintains the current behavior as the default, but also allows a bool to be passed which, if True, calls rl_forced_update_display instead.
I'm also interrested in this feature. Indeed, exporting rl_forced_update_display() is the only way I've found to make readline.set_completion_display_matches_hook() working properly. Without forcing the redisplay, the prompt is not displayed. This seems to be the proper function to call, because that's the one called at the end of display_matches() in libreadline code, which is the default function for displaying matches.
The attached file is a simple example code derived from http://pymotw.com/2/readline/ that shows that the patch is working.
zer0 commented on Feb 17, 2015
zer0mannequin
Mannequin
More actions
By the way, I have my own implementation of the patch that did before checking the issue tracker. Instead of adding an argument to readline.redisplay(), it adds a new function readline.forced_update_display().
I attach the patch for reference, I don't know what is the preferred way to add this feature.
Activity
dexteradeus commentedon Dec 16, 2014
The current implementation of readline implements the redisplay function, but not the forced version. This patch maintains the current behavior as the default, but also allows a bool to be passed which, if True, calls rl_forced_update_display instead.
zer0 commentedon Feb 17, 2015
Hi,
I'm also interrested in this feature. Indeed, exporting rl_forced_update_display() is the only way I've found to make readline.set_completion_display_matches_hook() working properly. Without forcing the redisplay, the prompt is not displayed. This seems to be the proper function to call, because that's the one called at the end of display_matches() in libreadline code, which is the default function for displaying matches.
The attached file is a simple example code derived from http://pymotw.com/2/readline/ that shows that the patch is working.
zer0 commentedon Feb 17, 2015
By the way, I have my own implementation of the patch that did before checking the issue tracker. Instead of adding an argument to readline.redisplay(), it adds a new function readline.forced_update_display().
I attach the patch for reference, I don't know what is the preferred way to add this feature.
vadmium commentedon Aug 2, 2015
There are actually a few other patches open adding wrappers for rl_forced_update_display():
As well as the documentation, I think it would be good to add a test case for new functionality if possible.