update changelog and fix clippy warnings

This commit is contained in:
Stephan Dilly 2021-04-30 15:27:01 +02:00
parent 42a792d5b3
commit 62c824a51c
3 changed files with 10 additions and 3 deletions

View file

@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
**commit subject length warning**
![warning](assets/commit-msg-length-limit.gif)
## Added
- warning if commit subject line gets too long ([#478](https://github.com/extrawurst/gitui/issues/478))
## [0.15.0] - 2020-04-27
**file blame**

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -207,7 +207,7 @@ impl CommitComponent {
.get_text()
.lines()
.next()
.map(|line| line.len())
.map(str::len)
.unwrap_or_default();
if first_line > FIRST_LINE_LIMIT {
@ -218,12 +218,12 @@ impl CommitComponent {
let rect = {
let mut rect = self.input.get_area();
rect.y = rect.y + rect.height.saturating_sub(1);
rect.y += rect.height.saturating_sub(1);
rect.height = 1;
let offset =
rect.width.saturating_sub(msg_length + 1);
rect.width = rect.width.saturating_sub(offset + 1);
rect.x = rect.x + offset;
rect.x += offset;
rect
};