mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-29 12:06:26 +03:00
fix diff at the end of file
This commit is contained in:
parent
b1f8914cba
commit
bfbde25116
@ -55,7 +55,6 @@ GITUI_LOGGING=true gitui
|
||||
|
||||
# todo for 0.1 (first release)
|
||||
|
||||
* [ ] fix: diff broken at end of file
|
||||
* [ ] fix: reset unstaged file also resets staged hunks
|
||||
* [ ] better help command
|
||||
* [ ] -> fix: dont show scroll option when any popup open
|
||||
@ -67,4 +66,7 @@ GITUI_LOGGING=true gitui
|
||||
|
||||
* https://github.com/jesseduffield/lazygit
|
||||
* https://github.com/jonas/tig
|
||||
* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool)
|
||||
* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool)
|
||||
|
||||
|
||||
asdad
|
@ -133,6 +133,7 @@ impl DiffComponent {
|
||||
Color::Reset
|
||||
})
|
||||
.fg(Color::DarkGray);
|
||||
|
||||
if end_of_hunk {
|
||||
text.push(Text::Styled(
|
||||
Cow::from(symbols::line::BOTTOM_LEFT),
|
||||
@ -170,11 +171,15 @@ impl DiffComponent {
|
||||
let filled = if selected {
|
||||
format!(
|
||||
"{:w$}\n",
|
||||
line.content.trim_end(),
|
||||
line.content.trim_matches('\n'),
|
||||
w = width as usize
|
||||
)
|
||||
} else {
|
||||
line.content.clone()
|
||||
if line.content.matches('\n').count() == 1 {
|
||||
line.content.clone()
|
||||
} else {
|
||||
format!("{}\n", line.content.trim_matches('\n'))
|
||||
}
|
||||
};
|
||||
let content = Cow::from(filled);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user