curlpipe / ox

An independent Rust text editor that runs in your terminal!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in Menu

pbordron opened this issue · comments

Describe the bug
Hitting backspace twice in menu makes ox crash

To Reproduce

  • Launch ox
ox
  • Hit backspace twice
  • ox crash with following error:
 ~  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                                                                                                                                       
 ~                       Abandon (core dumped)  

Expected behavior
No crash

Desktop (please complete the following information):

  • Manjaro linux with ox-git r272.bb9184b-1 from AUR
  • CentOS 7.8.2003 + ox v0.2.6 built with rust 1.46

I just saw duplicate entry here #63

commented

Thanks for the comprehensive report anyway :) this fix will be in 0.2.7 which hopefully will be out soon.