File tree Expand file tree Collapse file tree
android/src/main/java/com/inspiredandroid/linuxcommandbibliotheca/ui/composables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ fun CommandView(
107107 addStyle(
108108 style = ParagraphStyle (), // Default ParagraphStyle
109109 start = 0 ,
110- end = baseAnnotatedString.text.length
110+ end = baseAnnotatedString.text.length,
111111 )
112112 }
113113 }
Original file line number Diff line number Diff line change @@ -34,10 +34,17 @@ fun HighlightedText(
3434) {
3535 if (pattern.isEmpty()) {
3636 Text (
37- text,
37+ text = text ,
3838 maxLines = maxLines,
3939 overflow = TextOverflow .Ellipsis ,
4040 )
41+ } else if (text.equals(pattern, ignoreCase = true )) {
42+ Text (
43+ text = text,
44+ maxLines = maxLines,
45+ overflow = TextOverflow .Ellipsis ,
46+ color = MaterialTheme .colors.primary,
47+ )
4148 } else {
4249 val highlightColor = MaterialTheme .colors.primary
4350 val annotatedString = remember(text, pattern, highlightColor) {
You can’t perform that action at this time.
0 commit comments