mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +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")
|
.expect("todo: error handling")
|
||||||
.get(0)
|
.get(0)
|
||||||
.map_or_else(String::new, |entry| {
|
.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 {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
|
Loading…
Reference in New Issue
Block a user