Skip to content

Badly wrapped lines break history #89

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

Open
ikanobori opened this issue Jul 4, 2014 · 7 comments
Open

Badly wrapped lines break history #89

ikanobori opened this issue Jul 4, 2014 · 7 comments

Comments

@ikanobori
Copy link
Contributor

If, on the last line in the terminal, a long line is created, this line is wrapped badly:

>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
    abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
n   abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
no  abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nop abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqabcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm
nopqrstuvw
 <C-r> Rewind  <C-s> Save  <F8> Pastebin  <F9> Pager <F2> Show Source

When using the history in this way, a curses exception is thrown:

Traceback (most recent call last):
  File "/usr/local/bin/bpython", line 8, in <module>
    load_entry_point('bpython==0.9.6.2', 'console_scripts', 'bpython')()
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1594, in main
    banner=banner)
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1496, in curses_wrapper
    return func(stdscr, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1562, in main_curses
    repl.repl()
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 937, in repl
    inp = self.get_line()
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 546, in get_line
    if self.p_key(key) is None:
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 738, in p_key
    self.back()
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 280, in back
    self.clear_wrapped_lines()
  File "/usr/local/lib/python2.6/dist-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 344, in clear_wrapped_lines
    self.scr.move(y, 0)
_curses.error: wmove() returned ERR

@ikanobori
Copy link
Contributor Author

Issue #178 was marked as a duplicate of this issue.


Original Comment By: Amjith Ramanujam

@ikanobori
Copy link
Contributor Author

Issue #172 was marked as a duplicate of this issue.


Original Comment By: Andreas Stührk

@ikanobori
Copy link
Contributor Author

Issue #113 was marked as a duplicate of this issue.


Original Comment By: Andreas Stührk

@ikanobori
Copy link
Contributor Author

Still some issues left.


Original Comment By: Andreas Stührk

@ikanobori
Copy link
Contributor Author

Should be fixed with <>
and <>.


Original Comment By: Andreas Stührk

@ikanobori
Copy link
Contributor Author

Note: This only happens at the end of screen.


Original Comment By: Andreas Stührk

@ikanobori
Copy link
Contributor Author

NB. 'using history' means: 'press enter, press arrow-up twice'


Original Comment By: Anonymous

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

No branches or pull requests

2 participants