Skip to content

Commit 0fda42f

Browse files
committed
Fix gitui-org#1473 - correct msg limit in get_commits_intf
When sync::get_commits_inf is called in revlog:::fetch_commits, the message limit used was the length of the list which can be zero at start up before items are fetched. This results in initial view of the Log view showing empty messages.
1 parent 10bf4e3 commit 0fda42f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/commitlist.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ impl CommitList {
8888
}
8989

9090
///
91-
pub fn current_size(&self) -> (u16, u16) {
92-
self.current_size.get()
93-
}
91+
//pub fn current_size(&self) -> (u16, u16) {
92+
// self.current_size.get()
93+
//}
9494

9595
///
9696
pub fn set_count_total(&mut self, total: usize) {

src/tabs/revlog.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use tui::{
2828
};
2929

3030
const SLICE_SIZE: usize = 1200;
31+
static MAX_MESSAGE_WIDTH: usize = 100;
3132

3233
///
3334
pub struct Revlog {
@@ -160,7 +161,7 @@ impl Revlog {
160161
let commits = sync::get_commits_info(
161162
&self.repo.borrow(),
162163
&self.git_log.get_slice(want_min, SLICE_SIZE)?,
163-
self.list.current_size().0.into(),
164+
MAX_MESSAGE_WIDTH,
164165
);
165166

166167
if let Ok(commits) = commits {

0 commit comments

Comments
 (0)