Skip to content

Commit

Permalink
use trimBoth before using firstLineWithEllipsis when showing commit c…
Browse files Browse the repository at this point in the history
…omments so that the ellipsis is only shown when there is really more than one non-empty line
  • Loading branch information
svenvc committed Jun 27, 2024
1 parent e334f21 commit 1215069
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GToolkit4Git/GtGitRepository.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ GtGitRepository >> gtAllCommitsFor: aView [
aptitude: BrGlamorousLabelAptitude new;
hFitContent;
vFitContent ];
dataBinder: [ :e :i | e text: (commits at: i) comment firstLineWithEllipsis ].
dataBinder: [ :e :i | e text: (commits at: i) comment trimBoth firstLineWithEllipsis ].
list
when: BrSelectionDoubleClicked
do: [ :anEvent |
Expand Down Expand Up @@ -1006,7 +1006,7 @@ GtGitRepository >> gtCommitsFor: aView [
column: 'Author'
text: #author
width: 100;
column: 'Description' text: [ :t | t comment firstLineWithEllipsis ];
column: 'Description' text: [ :each | each comment trimBoth firstLineWithEllipsis ];
column: 'Actions'
do: [ :aColumn |
aColumn
Expand Down
2 changes: 1 addition & 1 deletion src/GToolkit4Git/IceCommit.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ IceCommit >> gtDetailsFor: aView [
. self tagNames asCommaString
. self tagNames }.
{ 'Comment'
. self comment firstLineWithEllipsis
. self comment trimBoth firstLineWithEllipsis
. self comment }.
{ 'Status' . self status }.
{ 'URL' . ((ZnUrl new scheme: #https; host: self repository origin host)
Expand Down

0 comments on commit 1215069

Please sign in to comment.