Skip to content

Add new line support for multi-line input box (follow up PR) #1309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7fcc94c
Add input multi-line support
WizardOhio24 Feb 8, 2021
a7d5008
Change commit key to alt c and newline to enter
WizardOhio24 Apr 16, 2021
e9f0b4d
commit via ctrl+o
Apr 17, 2021
18cbe48
Fix build use EventState
WizardOhio24 Apr 29, 2021
b1d19ce
Fix build
WizardOhio24 Apr 29, 2021
e764905
Add scrolling behaviour
WizardOhio24 May 23, 2021
ce8f315
Add scrollbar
WizardOhio24 May 23, 2021
bc664b5
Fix clippy errors
WizardOhio24 May 23, 2021
7a4cddf
Try to fix scrolling
WizardOhio24 May 25, 2021
5b8d7f2
Fix scrolling behaviour on incriment and decrement cursor
WizardOhio24 May 25, 2021
46b027a
Fix scrollbar scrolling
WizardOhio24 May 25, 2021
5628139
Fix up and down arrow scrolling
WizardOhio24 May 25, 2021
8b0526f
Fix clippy and remove unused variable
WizardOhio24 May 25, 2021
b552477
Remove unessessary comments
WizardOhio24 May 25, 2021
13bc8fb
Fix intersperse clippy error
WizardOhio24 May 25, 2021
e7a307f
Textbox resize to number of lines
WizardOhio24 May 25, 2021
96b6f21
Show scrollbar only if text area larger than frame
WizardOhio24 May 25, 2021
2e5ed68
Scroll up when backspace over newline char
WizardOhio24 May 25, 2021
c55fdc5
Remove else if input event consumed
WizardOhio24 May 25, 2021
9c681ee
Make command for newline only show on multiline textboxes
WizardOhio24 May 25, 2021
0410e3a
Add some comments and seperation between single and multiline
WizardOhio24 May 25, 2021
94da93e
Fix build
WizardOhio24 May 25, 2021
2dbfaa7
Fix clippy error
WizardOhio24 May 25, 2021
0f851d7
Change ends in nl to add a span
WizardOhio24 May 25, 2021
d7cc3fa
Fix moving down a line
WizardOhio24 May 25, 2021
83563a1
Some fixes
WizardOhio24 May 27, 2021
8147b5f
fixed bugs in multi line pr
guzzit Sep 1, 2022
4795b43
resolved conflicts
guzzit Sep 4, 2022
1c179b7
resolved conflicts
guzzit Sep 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixes
* remove insecure dependency `ansi_term` ([#1290](https://github.com/extrawurst/gitui/issues/1290))

### Changed
* `enter` adds *newline* to commit msg (*commit* via `ctrl+o` now) [[@WizardOhio24](https://github.com/WizardOhio24)] ([#509](https://github.com/extrawurst/gitui/issues/509))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not forget to add yourself here


## [0.21.0] - 2021-08-17

**popup stacking**
Expand Down
5 changes: 2 additions & 3 deletions src/components/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ impl Component for CommitComponent {

if self.is_visible() || force_all {
out.push(CommandInfo::new(
strings::commands::commit_enter(&self.key_config),
strings::commands::commit(&self.key_config),
self.can_commit(),
true,
));
Expand Down Expand Up @@ -340,7 +340,7 @@ impl Component for CommitComponent {
}

if let Event::Key(e) = ev {
if key_match(e, self.key_config.keys.enter)
if key_match(e, self.key_config.keys.commit)
&& self.can_commit()
{
try_or_popup!(
Expand All @@ -362,7 +362,6 @@ impl Component for CommitComponent {
InternalEvent::OpenExternalEditor(None),
);
self.hide();
} else {
}
// stop key event propagation
return Ok(EventState::Consumed);
Expand Down
Loading