Magnus Groß 087e11ebbb Drop duplicate entries from CharSelect menu
Previously the same emoji was able to appear multiple times in the
CharSelect modal for emoji input, because one emoji might have multiple
aliases. In fact, often the aliases have similar names, making it
especially likely that a fuzzy match matches multiple aliases at the
same time.

The same Unicode char may even match multiple times both as
Character::Unicode as well as a Character::Emoji.

To make the deduplication easy, store the results in a hash map instead
of a vector. We use the glyph as the key of the map to get free
deduplication.

Only update the mapped value, if a duplicate entry would improve the
score.

Performance-wise this is pretty much identical to the previous state.
We do see minor performance regression for very large n - granted, this
is expected as we do more work - but the use of the HashMap covers up
for a large part of it.

If the user types more than 3 characters, the performance is absolutely
identical. For less than 3 characters, the performance was unacceptable
anyway (700 ms before this patch, 800 ms after this patch on my system).

Here is a side-by-side comparison for a user iteratively typing the
query "no-evil":

#  Before         After
1  718.361276ms   837.612275ms
2  719.532450ms   816.348394ms
3  349.625101ms   369.726458ms
4  356.349671ms   354.367768ms
5  363.862194ms   361.985546ms
6  372.339582ms   370.022932ms
7  381.123785ms   378.349672ms

In fact, for small n, the hash map seems to perform even slightly better
than the vector.
For large n we need to optimize the performance anyway, as both 700ms
and 800ms are unacceptable.
Thus, this is worth it for the benefit of Unicode symbol deduplication.
2023-07-10 17:16:23 -07:00
2023-07-05 06:50:14 -07:00
2023-07-09 20:29:47 -07:00
2019-06-08 21:28:11 -07:00
2022-05-21 21:09:11 -07:00
2023-05-27 14:10:07 -07:00
2023-04-18 08:34:39 -07:00
2023-07-10 17:14:48 -07:00
2023-07-09 07:38:36 -07:00
2023-07-10 17:14:48 -07:00
2023-07-10 17:14:48 -07:00
2023-07-09 13:53:41 -07:00
2022-10-04 08:55:31 -07:00
2023-03-23 21:43:28 -07:00
2022-08-17 07:19:12 -07:00
2023-03-19 13:12:20 -07:00
2023-04-21 07:53:30 -07:00
2021-02-03 21:56:30 -08:00
2022-12-07 12:09:06 -08:00
2023-07-09 21:20:48 -07:00
2023-05-16 20:42:29 -07:00
2022-01-16 16:04:35 -07:00
2023-04-02 23:37:54 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

  • You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
  • Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
  • There is a Matrix room via Element.io for (potentially!) real time discussions.

The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.

Supporting the Project

If you use and like WezTerm, please consider sponsoring it: your support helps to cover the fees required to maintain the project and to validate the time spent working on it!

Read more about sponsoring.

S
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
Readme MIT
316 MiB
0 Stars 2 Watchers 0 Forks
Languages
Rust 97.7%
Python 1%
Shell 0.9%
Nix 0.2%