panicked at 'index out of bounds: the len is 0 but the index is 0', src/document.rs:385:21
jdelgadoalfonso opened this issue · comments
Jose Antonio Delgado Alfonso commented
Describe the bug
Edit an empty buffer causes a panic.
To Reproduce
Steps to reproduce the behavior:
- Execute ox with no parameters.
- Press backspace key twice.
- The application panics showing
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/document.rs:385:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1] 713693 abort (core dumped) ox
Expected behavior
Control an empty buffer and do not panic.
Desktop (please complete the following information):
- OS: ArchLinux
- commit (fd24743)
Luke commented
duplicate