@@ -732,6 +732,9 @@ internal async ValueTask<List<Result>> _GetCommands(CancellationToken token, Que
732732 results . Add ( new Result
733733 {
734734 Title = $ "Stop { runningTimeEntry . GetDescription ( ) } ",
735+ TitleHighlightData = ( runningTimeEntry . GetDescription ( ) == Settings . EmptyDescription )
736+ ? new List < int > ( )
737+ : Enumerable . Range ( "Stop " . Length , runningTimeEntry . GetDescription ( ) . Length ) . ToList ( ) ,
735738 SubTitle = $ "{ runningTimeEntry . Project ? . WithClientName ?? Settings . NoProjectName } | { runningTimeEntry . HumanisedElapsed } ({ runningTimeEntry . DetailedElapsed } )",
736739 IcoPath = this . _iconProvider . GetColourIcon ( runningTimeEntry . Project ? . Colour , IconProvider . StopIcon ) ,
737740 AutoCompleteText = $ "{ this . _context . CurrentPluginMetadata . ActionKeyword } { Settings . StopCommand } ",
@@ -1122,6 +1125,9 @@ out startTimeSpan
11221125 results . Add ( new Result
11231126 {
11241127 Title = $ "Start { ( ( string . IsNullOrEmpty ( description ) ? Settings . EmptyTimeEntry : description ) ) } now",
1128+ TitleHighlightData = ( string . IsNullOrEmpty ( description ) )
1129+ ? new List < int > ( )
1130+ : Enumerable . Range ( "Start " . Length , description . Length ) . ToList ( ) ,
11251131 SubTitle = projectName ,
11261132 IcoPath = this . _iconProvider . GetColourIcon ( project ? . Colour , IconProvider . StartIcon ) ,
11271133 AutoCompleteText = $ "{ query . ActionKeyword } { query . Search } ",
@@ -1244,6 +1250,9 @@ out var startTimeSpan
12441250 results . Add ( new Result
12451251 {
12461252 Title = $ "Start { ( ( string . IsNullOrEmpty ( sanitisedDescription ) ? Settings . EmptyTimeEntry : sanitisedDescription ) ) } { startTime . Humanize ( ) } at { startTime . ToLocalTime ( ) . ToString ( "t" ) } ",
1253+ TitleHighlightData = ( string . IsNullOrEmpty ( sanitisedDescription ) )
1254+ ? new List < int > ( )
1255+ : Enumerable . Range ( "Start " . Length , sanitisedDescription . Length ) . ToList ( ) ,
12471256 SubTitle = projectName ,
12481257 IcoPath = this . _iconProvider . GetColourIcon ( project ? . Colour , IconProvider . StartIcon ) ,
12491258 AutoCompleteText = $ "{ query . ActionKeyword } { query . Search } ",
@@ -1320,6 +1329,9 @@ out var startTimeSpan
13201329 results . Add ( new Result
13211330 {
13221331 Title = $ "Start { ( ( string . IsNullOrEmpty ( description ) ? Settings . EmptyTimeEntry : description ) ) } { likelyPastTimeEntry . HumanisedStop } at previous stop time",
1332+ TitleHighlightData = ( string . IsNullOrEmpty ( description ) )
1333+ ? new List < int > ( )
1334+ : Enumerable . Range ( "Start " . Length , description . Length ) . ToList ( ) ,
13231335 SubTitle = projectName ,
13241336 IcoPath = this . _iconProvider . GetColourIcon ( project ? . Colour , IconProvider . StartIcon ) ,
13251337 AutoCompleteText = $ "{ query . ActionKeyword } { query . Search } ",
@@ -1414,6 +1426,9 @@ private async ValueTask<List<Result>> _GetStopResults(CancellationToken token, Q
14141426 results . Add ( new Result
14151427 {
14161428 Title = $ "Stop { runningTimeEntry . GetDescription ( ) } now",
1429+ TitleHighlightData = ( runningTimeEntry . GetDescription ( ) == Settings . EmptyDescription )
1430+ ? new List < int > ( )
1431+ : Enumerable . Range ( "Stop " . Length , runningTimeEntry . GetDescription ( ) . Length ) . ToList ( ) ,
14171432 SubTitle = $ "{ projectName } | { runningTimeEntry . HumanisedElapsed } ({ runningTimeEntry . DetailedElapsed } )",
14181433 IcoPath = this . _iconProvider . GetColourIcon ( runningTimeEntry . Project ? . Colour , IconProvider . StopIcon ) ,
14191434 AutoCompleteText = $ "{ query . ActionKeyword } { Settings . StopCommand } { runningTimeEntry . GetDescription ( escapePotentialSymbols : true ) } ",
@@ -1519,6 +1534,9 @@ out var stopTimeSpan
15191534 results . Add ( new Result
15201535 {
15211536 Title = $ "Stop { runningTimeEntry . GetDescription ( ) } { stopTime . Humanize ( ) } at { stopTime . ToLocalTime ( ) . ToString ( "t" ) } ",
1537+ TitleHighlightData = ( runningTimeEntry . GetDescription ( ) == Settings . EmptyDescription )
1538+ ? new List < int > ( )
1539+ : Enumerable . Range ( "Stop " . Length , runningTimeEntry . GetDescription ( ) . Length ) . ToList ( ) ,
15221540 SubTitle = $ "{ projectName } | { newElapsed . Humanize ( minUnit : Humanizer . Localisation . TimeUnit . Second , maxUnit : Humanizer . Localisation . TimeUnit . Hour ) } ({ ( int ) newElapsed . TotalHours } :{ newElapsed . ToString ( @"mm\:ss" ) } )",
15231541 IcoPath = this . _iconProvider . GetColourIcon ( runningTimeEntry . Project ? . Colour , IconProvider . StopIcon ) ,
15241542 AutoCompleteText = $ "{ query . ActionKeyword } { query . Search } ",
@@ -2417,6 +2435,9 @@ private async ValueTask<List<Result>> _GetDeleteResults(CancellationToken token,
24172435 new Result
24182436 {
24192437 Title = $ "Delete { timeEntry . GetDescription ( ) } ",
2438+ TitleHighlightData = ( timeEntry . GetDescription ( ) == Settings . EmptyDescription )
2439+ ? new List < int > ( )
2440+ : Enumerable . Range ( "Delete " . Length , timeEntry . GetDescription ( ) . Length ) . ToList ( ) ,
24202441 SubTitle = $ "{ timeEntry . Project ? . WithClientName ?? Settings . NoProjectName } | { timeEntry . HumanisedElapsed } ({ timeEntry . DetailedElapsed } )",
24212442 IcoPath = this . _iconProvider . GetColourIcon ( timeEntry . Project ? . Colour , IconProvider . DeleteIcon ) ,
24222443 AutoCompleteText = $ "{ this . _context . CurrentPluginMetadata . ActionKeyword } { Settings . DeleteCommand } { timeEntry . GetDescription ( escapePotentialSymbols : true ) } ",
0 commit comments