If the last line in a buffer is deleted with dd vai crashes with the following traceback:
Apologies. Vai has crashed.
---------------------------
Traceback (most recent call last):
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/__init__.py", line 107, in main
app.exec_()
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vaitk-1.7-py3.4.egg/vaitk/gui/VApplication.py", line 137, in exec_
self.processEvents(True)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vaitk-1.7-py3.4.egg/vaitk/gui/VApplication.py", line 144, in processEvents
self._processKeyEvents()
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vaitk-1.7-py3.4.egg/vaitk/gui/VApplication.py", line 300, in _processKeyEvents
self._processSingleKeyEvent(event)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vaitk-1.7-py3.4.egg/vaitk/gui/VApplication.py", line 322, in _processSingleKeyEvent
widget.keyEvent(key_event)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/EditArea.py", line 133, in keyEvent
self._controller.handleKeyEvent(event)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/controllers/EditAreaController.py", line 541, in handleKeyEvent
new_state = state.handleEvent(event, self._buffer, self._global_state, self._edit_area, self._editor_controller)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/controllers/EditAreaController.py", line 27, in handleEvent
new_state = cls._handleNonDirectionalKey(event, buffer, global_state, edit_area, editor_controller)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/controllers/EditAreaController.py", line 346, in _handleNonDirectionalKey
result = command.execute()
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/models/commands/DeleteLineAtCursorCommand.py", line 38, in execute
document.deleteLine(pos[0])
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/models/TextDocument.py", line 283, in deleteLine
meta.notifyObservers()
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/models/LineMetaInfo.py", line 79, in notifyObservers
self.contentChanged.emit()
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vaitk-1.7-py3.4.egg/vaitk/core/VSignal.py", line 25, in emit
slot(*args, **kwargs)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/controllers/SideRulerController.py", line 51, in updateWidget
changed_data = self._buffer.document.lineMetaInfo("Change").dataForLines(needed_lines)
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/models/LineMetaInfo.py", line 72, in dataForLines
return {i: self._data[i-1] for i in lines}
File "/home/syrn/git/vai/env/lib/python3.4/site-packages/vai-1.7-py3.4.egg/vai/models/LineMetaInfo.py", line 72, in <dictcomp>
return {i: self._data[i-1] for i in lines}
IndexError: list index out of range
If the last line in a buffer is deleted with
dd
vai crashes with the following traceback:How to reproduce (chars to input):