Skip to content

Commit b9a2e13

Browse files
authored
tui textarea (#2051)
1 parent 3439862 commit b9a2e13

File tree

6 files changed

+682
-555
lines changed

6 files changed

+682
-555
lines changed

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ syntect = { version = "5.2", default-features = false, features = [
5454
"default-themes",
5555
"html",
5656
] }
57+
tui-textarea = "0.4.0"
5758
unicode-segmentation = "1.11"
5859
unicode-truncate = "0.2"
5960
unicode-width = "0.1"

src/components/commit.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,12 @@ impl Component for CommitComponent {
553553
self.options.borrow().has_commit_msg_history(),
554554
true,
555555
));
556+
557+
out.push(CommandInfo::new(
558+
strings::commands::newline(&self.key_config),
559+
true,
560+
true,
561+
));
556562
}
557563

558564
visibility_blocking(self)
@@ -565,7 +571,7 @@ impl Component for CommitComponent {
565571
}
566572

567573
if let Event::Key(e) = ev {
568-
if key_match(e, self.key_config.keys.enter)
574+
if key_match(e, self.key_config.keys.commit)
569575
&& self.can_commit()
570576
{
571577
try_or_popup!(

0 commit comments

Comments
 (0)