fix clippy, add typo dict (#698)

This commit is contained in:
WindSoilder 2024-01-04 21:44:18 +08:00 committed by GitHub
parent f3962232ba
commit aa101f4d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -6,3 +6,5 @@ extend-exclude = ["src/core_editor/line_buffer.rs"]
iterm = "iterm"
# For testing completion of the word build
bui = "bui"
# for sqlite backed history
wheres = "wheres"

View File

@ -1538,7 +1538,7 @@ impl Reedline {
self.get_history_session_id(),
)))
.unwrap_or_else(|_| Vec::new())
.get(0)
.first()
.and_then(|history| history.command_line.split_whitespace().next_back())
.map(|token| (parsed.remainder.len(), indicator.len(), token.to_string())),
});