mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
update changelog and fix clippy warnings
This commit is contained in:
parent
42a792d5b3
commit
62c824a51c
3 changed files with 10 additions and 3 deletions
|
|
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Unreleased
|
||||
|
||||
**commit subject length warning**
|
||||
|
||||

|
||||
|
||||
## 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**
|
||||
|
|
|
|||
BIN
assets/commit-msg-length-limit.gif
Normal file
BIN
assets/commit-msg-length-limit.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue