Functions | |
| std::string | ToLower (std::string_view text) |
| bool | IsAlnum (char c) |
| bool | IsWordStartAt (const std::string &text, size_t index) |
| std::vector< std::string > | SplitWhitespace (const std::string &text) |
| int | BestSubsequenceScore (const std::string &text, const std::string &query) |
| int | ScoreSingle (const std::string &text, const std::string &query) |
| bool | HasPanelWord (std::string_view name) |
| int | FrecencyBoost (int usage_count, int64_t last_used_ms, int64_t now_ms) |
Variables | |
| constexpr int | kScoreExact = 1000 |
| constexpr int | kScorePrefix = 800 |
| constexpr int | kScoreWordStartSubstring = 600 |
| constexpr int | kScoreSubstring = 400 |
| constexpr int | kScoreSubsequenceMax = kScoreSubstring - 1 |
| constexpr int | kCharBase = 2 |
| constexpr int | kCharWordStartBonus = 8 |
| constexpr int | kCharConsecutiveBonus = 4 |
| constexpr const char * | kShortcutsProviderId = "shortcuts" |
| std::string yaze::editor::anonymous_namespace{command_palette.cc}::ToLower | ( | std::string_view | text | ) |
Definition at line 45 of file command_palette.cc.
| bool yaze::editor::anonymous_namespace{command_palette.cc}::IsAlnum | ( | char | c | ) |
Definition at line 53 of file command_palette.cc.
References IsAlnum().
Referenced by HasPanelWord(), IsAlnum(), and IsWordStartAt().

| bool yaze::editor::anonymous_namespace{command_palette.cc}::IsWordStartAt | ( | const std::string & | text, |
| size_t | index ) |
Definition at line 57 of file command_palette.cc.
References IsAlnum(), and IsWordStartAt().
Referenced by BestSubsequenceScore(), IsWordStartAt(), and ScoreSingle().

| std::vector< std::string > yaze::editor::anonymous_namespace{command_palette.cc}::SplitWhitespace | ( | const std::string & | text | ) |
Definition at line 61 of file command_palette.cc.
References SplitWhitespace().
Referenced by SplitWhitespace().

| int yaze::editor::anonymous_namespace{command_palette.cc}::BestSubsequenceScore | ( | const std::string & | text, |
| const std::string & | query ) |
Definition at line 81 of file command_palette.cc.
References BestSubsequenceScore(), IsWordStartAt(), kCharBase, kCharConsecutiveBonus, kCharWordStartBonus, and yaze::editor::kNone.
Referenced by BestSubsequenceScore(), and ScoreSingle().

| int yaze::editor::anonymous_namespace{command_palette.cc}::ScoreSingle | ( | const std::string & | text, |
| const std::string & | query ) |
Definition at line 121 of file command_palette.cc.
References BestSubsequenceScore(), IsWordStartAt(), kScoreExact, kScorePrefix, kScoreSubsequenceMax, kScoreSubstring, kScoreWordStartSubstring, and ScoreSingle().
Referenced by ScoreSingle().

| bool yaze::editor::anonymous_namespace{command_palette.cc}::HasPanelWord | ( | std::string_view | name | ) |
Definition at line 144 of file command_palette.cc.
References HasPanelWord(), and IsAlnum().
Referenced by HasPanelWord().

| int yaze::editor::anonymous_namespace{command_palette.cc}::FrecencyBoost | ( | int | usage_count, |
| int64_t | last_used_ms, | ||
| int64_t | now_ms ) |
Definition at line 159 of file command_palette.cc.
References FrecencyBoost().
Referenced by FrecencyBoost().

|
constexpr |
Definition at line 28 of file command_palette.cc.
Referenced by ScoreSingle().
|
constexpr |
Definition at line 29 of file command_palette.cc.
Referenced by ScoreSingle().
|
constexpr |
Definition at line 30 of file command_palette.cc.
Referenced by ScoreSingle().
|
constexpr |
Definition at line 31 of file command_palette.cc.
Referenced by ScoreSingle().
|
constexpr |
Definition at line 32 of file command_palette.cc.
Referenced by ScoreSingle().
|
constexpr |
Definition at line 37 of file command_palette.cc.
Referenced by BestSubsequenceScore().
|
constexpr |
Definition at line 38 of file command_palette.cc.
Referenced by BestSubsequenceScore().
|
constexpr |
Definition at line 39 of file command_palette.cc.
Referenced by BestSubsequenceScore().
|
constexpr |
Definition at line 43 of file command_palette.cc.