diff --git a/nested/src/editors/list/editor.rs b/nested/src/editors/list/editor.rs index b374b48..a269ee2 100644 --- a/nested/src/editors/list/editor.rs +++ b/nested/src/editors/list/editor.rs @@ -52,7 +52,7 @@ impl ListEditor { ListCursorMode::Insert => ip, ListCursorMode::Select => { if let Some(idx) = c.idx { - if idx > 0 && idx < data.len() as isize { + if idx >= 0 && idx < data.len() as isize { data.get(idx as usize).read().unwrap().get_mode_view() } else { eprintln!("ListEditor::mode_port invalid cursor idx");