Skip to content

Export readline forced_update_display #67256

Open

Description

@dexteradeus
BPO 23067
Nosy @vadmium
Files
  • readline_redisplay_force.patch
  • test-rdline.py: readline test example
  • readline_add_forced_update_display.patch: Another way to fix the problem (patch)
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2014-12-16.19:29:14.720>
    labels = ['extension-modules', 'type-feature']
    title = 'Export readline forced_update_display'
    updated_at = <Date 2015-08-02.01:23:39.198>
    user = 'https://bugs.python.org/dexteradeus'

    bugs.python.org fields:

    activity = <Date 2015-08-02.01:23:39.198>
    actor = 'martin.panter'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2014-12-16.19:29:14.720>
    creator = 'dexteradeus'
    dependencies = []
    files = ['37473', '38162', '38163']
    hgrepos = []
    issue_num = 23067
    keywords = ['patch']
    message_count = 4.0
    messages = ['232757', '236147', '236148', '247847']
    nosy_count = 3.0
    nosy_names = ['martin.panter', 'dexteradeus', 'zer0']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue23067'
    versions = ['Python 3.6']

    Activity

    1. dexteradeus commented on Dec 16, 2014

      dexteradeusmannequin
      MannequinAuthor

      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.

    2. zer0 commented on Feb 17, 2015

      zer0mannequin
      Mannequin

      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.

    3. zer0 commented on Feb 17, 2015

      zer0mannequin
      Mannequin

      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.

    4. vadmium commented on Aug 2, 2015

      @vadmium
      Member

      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.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions