Skip to content

Commit

Permalink
fix(commit): use interact_text for text input
Browse files Browse the repository at this point in the history
This will support navigating with keys when using convco commit.

Refs: #197
  • Loading branch information
hdevalke committed Mar 6, 2024
1 parent ccc1b0d commit f35666f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmd/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn read_single_line(
.with_prompt(prompt)
.default(default.to_string())
.allow_empty(true)
.interact()?)
.interact_text()?)
}

impl CommitCommand {
Expand Down Expand Up @@ -82,7 +82,7 @@ fn read_scope(
})
.default(default.to_string())
.allow_empty(true)
.interact()?;
.interact_text()?;
Ok(result)
}

Expand All @@ -101,7 +101,7 @@ fn read_description(
})
.default(default)
.allow_empty(false)
.interact()?;
.interact_text()?;
Ok(result)
}

Expand Down Expand Up @@ -278,7 +278,7 @@ impl Command for CommitCommand {

let input: String = dialoguer::Input::new()
.with_prompt("Do you want to (a)ccept/(e)dit/(r)eject?")
.interact()
.interact_text()
.unwrap();
match input.as_str() {
"a" | "accept" => {
Expand Down

0 comments on commit f35666f

Please sign in to comment.