Skip to content

Commit

Permalink
Merge pull request #19 from m5p3nc3r/linefeed
Browse files Browse the repository at this point in the history
Add LF as a valid line terminator
  • Loading branch information
eivindbergem authored Feb 22, 2024
2 parents 6e6d8b7 + 9462281 commit 5363968
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Added Linefeed as a valid line terminator

## [0.2.0] - 2022-03-22

- Added basic line history
Expand Down
4 changes: 2 additions & 2 deletions noline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include = [
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
num_enum = {version = "0.5.6", default-features = false}
num_enum = {version = "0.7.0", default-features = false}
embedded-hal = {version = "0.2.6", optional = true}
nb = {version = "1.0.0", optional = true}
tokio = {version = "1.16.1", optional = true, features = ["io-util", "sync"]}
Expand All @@ -31,7 +31,7 @@ alloc = []
[dev-dependencies]
crossbeam = "0.8.1"
nb = {version = "1.0.0"}
termion = "1.5.6"
termion = "2.0.1"

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion noline/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl<'a, B: Buffer, H: History> Line<'a, B, H> {
let move_cursor = -(self.buffer.delete_previous_word(pos) as isize);
self.generate_output(MoveCursorAndEraseAndPrintBuffer(move_cursor))
}
CarriageReturn => {
CarriageReturn | LineFeed => {
if self.buffer.len() > 0 {
let _ = self.nav.history.add_entry(self.buffer.as_str());
}
Expand Down

0 comments on commit 5363968

Please sign in to comment.