Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d8e7112

Browse files
committedSep 30, 2024
fix CHANGELOG.md conflict
1 parent d98171b commit d8e7112

File tree

6 files changed

+8
-21
lines changed

6 files changed

+8
-21
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
### Added
1818
* add popups for viewing, adding, updating and removing remotes [[@robin-thoene](https://github.com/robin-thoene)] ([#2172](https://github.com/extrawurst/gitui/issues/2172))
19+
* When the terminal is insufficient to display all the commands, the cmdbar_bg configuration color does not fully take effect. ([#2347](https://github.com/extrawurst/gitui/issues/2347))
1920

2021
## [0.26.3] - 2024-06-02
2122

‎asyncgit/src/sync/commit_filter.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ pub fn filter_commit_by_search(
214214

215215
Ok(msg_summary_match
216216
|| msg_body_match
217-
|| file_match
218-
|| authors_match)
217+
|| file_match || authors_match)
219218
},
220219
))
221220
}

‎src/cmdbar.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ enum DrawListEntry {
2020
struct Command {
2121
txt: String,
2222
enabled: bool,
23-
line: usize,
2423
}
2524

2625
/// helper to be used while drawing
@@ -106,7 +105,6 @@ impl CommandBar {
106105
self.draw_list.push(DrawListEntry::Command(Command {
107106
txt: c.text.name.to_string(),
108107
enabled: c.enabled,
109-
line: lines.saturating_sub(1) as usize,
110108
}));
111109
}
112110

@@ -157,9 +155,7 @@ impl CommandBar {
157155
DrawListEntry::Command(c) => {
158156
Span::styled(
159157
Cow::from(c.txt.as_str()),
160-
self.theme.commandbar(
161-
c.enabled, c.line,
162-
),
158+
self.theme.commandbar(c.enabled),
163159
)
164160
}
165161
DrawListEntry::LineBreak => {

‎src/popups/remotelist.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ impl RemoteListPopup {
245245
.enumerate()
246246
.map(|(i, remote)| {
247247
let selected = (self.selection as usize
248-
- self.scroll.get_top())
249-
== i;
248+
- self.scroll.get_top()) == i;
250249
let mut remote_name = remote.clone();
251250
if remote_name.len()
252251
> name_length

‎src/tabs/status.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,7 @@ impl Status {
686686
strings::commands::select_staging(&self.key_config),
687687
!focus_on_diff,
688688
(self.visible
689-
&& !focus_on_diff
690-
&& self.focus == Focus::WorkDir)
689+
&& !focus_on_diff && self.focus == Focus::WorkDir)
691690
|| force_all,
692691
)
693692
.order(strings::order::NAV),
@@ -697,8 +696,7 @@ impl Status {
697696
strings::commands::select_unstaged(&self.key_config),
698697
!focus_on_diff,
699698
(self.visible
700-
&& !focus_on_diff
701-
&& self.focus == Focus::Stage)
699+
&& !focus_on_diff && self.focus == Focus::Stage)
702700
|| force_all,
703701
)
704702
.order(strings::order::NAV),

‎src/ui/style.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub struct Theme {
1616
selection_bg: Color,
1717
selection_fg: Color,
1818
cmdbar_bg: Color,
19-
cmdbar_extra_lines_bg: Color,
2019
disabled_fg: Color,
2120
diff_line_add: Color,
2221
diff_line_delete: Color,
@@ -204,17 +203,13 @@ impl Theme {
204203
self.line_break.clone()
205204
}
206205

207-
pub fn commandbar(&self, enabled: bool, line: usize) -> Style {
206+
pub fn commandbar(&self, enabled: bool) -> Style {
208207
if enabled {
209208
Style::default().fg(self.command_fg)
210209
} else {
211210
Style::default().fg(self.disabled_fg)
212211
}
213-
.bg(if line == 0 {
214-
self.cmdbar_bg
215-
} else {
216-
self.cmdbar_extra_lines_bg
217-
})
212+
.bg(self.cmdbar_bg)
218213
}
219214

220215
pub fn commit_hash(&self, selected: bool) -> Style {
@@ -335,7 +330,6 @@ impl Default for Theme {
335330
selection_bg: Color::Blue,
336331
selection_fg: Color::White,
337332
cmdbar_bg: Color::Blue,
338-
cmdbar_extra_lines_bg: Color::Blue,
339333
disabled_fg: Color::DarkGray,
340334
diff_line_add: Color::Green,
341335
diff_line_delete: Color::Red,

0 commit comments

Comments
 (0)
Please sign in to comment.