Skip to content

Another unhighlight_paren bug #468

Closed
@thomasballinger

Description

@thomasballinger
(bpython)tom-mba:~ tomb$ bpython
bpython version 0.13-463 on top of Python 2.7.5 /Users/tomb/.virtualenvs/bpython/bin/python2.7
>>> print inspect.getsource(inspect.getsourcelines)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'inspect' is not defined
>>> inspect
Traceback (most recent call last):
  File "/Users/tomb/.virtualenvs/bpython/bin/bpython", line 9, in <module>
    load_entry_point('bpython==0.13-463', 'console_scripts', 'bpython')()
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py", line 70, in main
    mainloop(config, locals_, banner, interp, paste, interactive=(not exec_args))
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py", line 154, in mainloop
    process_event(e)
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py", line 117, in process_event
    repl.process_event(e)
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 435, in process_event
    return self.process_key_event(e)
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 542, in process_key_event
    self.on_enter()
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 618, in on_enter
    self.push(self.current_line, insert_into_history=insert_into_history)
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 848, in push
    self.cursor_offset = 0
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 1265, in _set_cursor_offset
    self.unhighlight_paren()
  File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py", line 900, in unhighlight_paren
    self.display_buffer[lineno] = self.display_buffer[lineno].setslice_with_length(0, len(new), new, len(self.display_buffer[lineno]))
  File "/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/curtsies/formatstring.py", line 174, in setslice_with_length
    assert len(result) <= length
AssertionError
(bpython)tom-mba:~ tomb$

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions