Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search result submission does not clear line properly #15

Closed
ivanov opened this issue May 16, 2017 · 2 comments
Closed

search result submission does not clear line properly #15

ivanov opened this issue May 16, 2017 · 2 comments

Comments

@ivanov
Copy link
Member

ivanov commented May 16, 2017

the right line gets submitted, but it doesn't display nicely.

For example, here was me reverse searching for import rl and then hitting <enter>

$ ipython
Python 3.5.2 (default, Sep 28 2016, 18:08:09)
Type "copyright", "credits" or "license" for more information.

IPython 5.4.0.dev -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: -i-search)`import rl': import rlipython

In [2]:
@ivanov
Copy link
Member Author

ivanov commented May 17, 2017

looks like this has to do with the invisible characters we're printing to have nice colorful In [] prompts. IPython 4 used a prompt_manager to handle this tomfoolery - accounting for the number of invisible characters on render. I guess as part of getting #6 and #9, I might as well resurrect the prompt_manager stuff here.

@ivanov ivanov closed this as completed in fd6fec6 May 17, 2017
@ivanov
Copy link
Member Author

ivanov commented May 17, 2017

Oh, figured it out, needed \001 and \002 escapes for readline to know about those pesky invisible escape codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant