File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/cursorless-engine/src/util/allocateHats Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ function getTokenRemainingHatCandidates(
184184 // and calling tiny functions lots of times.
185185
186186 for ( const grapheme of graphemes ) {
187+ const isFirstLetter = firstLetterOffsets . has ( grapheme . tokenStartOffset ) ;
188+
187189 for ( const style of graphemeRemainingHatCandidates . get ( grapheme . text ) ) {
188190 // Allocating and pushing all of these objects is
189191 // the single most expensive thing in hat allocation.
@@ -192,7 +194,7 @@ function getTokenRemainingHatCandidates(
192194 grapheme,
193195 style,
194196 penalty : enabledHatStyles [ style ] . penalty ,
195- isFirstLetter : firstLetterOffsets . has ( grapheme . tokenStartOffset ) ,
197+ isFirstLetter,
196198 } ) ;
197199 }
198200 }
You can’t perform that action at this time.
0 commit comments