mirror of
https://github.com/nushell/reedline.git
synced 2024-10-27 01:45:51 +03:00
Fix panic when using sqlite as history backend (#469)
Fixes nushell/nushell#6251
This commit is contained in:
parent
d4ab1a753f
commit
069d902bcb
@ -24,7 +24,11 @@ impl Hinter for DefaultHinter {
|
||||
.expect("todo: error handling")
|
||||
.get(0)
|
||||
.map_or_else(String::new, |entry| {
|
||||
entry.command_line[line.len()..].to_string()
|
||||
entry
|
||||
.command_line
|
||||
.get(line.len()..)
|
||||
.unwrap_or_default()
|
||||
.to_string()
|
||||
})
|
||||
} else {
|
||||
String::new()
|
||||
|
Loading…
Reference in New Issue
Block a user