1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00
Commit Graph

3652 Commits

Author SHA1 Message Date
Wez Furlong
d4da670294 docs for and minor tweak of curly underline improvement
refs: https://github.com/wez/wezterm/pull/733
2021-04-30 09:22:01 -07:00
Wez Furlong
67de3f2235 Add underline test script 2021-04-30 09:20:08 -07:00
Roland Fredenhagen
7b274d460e
Better function for undercurl (#733)
* Better function for undercurl

* Setting lower alpha

* underline alpha in line-frag

* make undercurl alpha background independent

* Improved Shader

* Old Rasterization

Co-authored-by: Roland Fredenhagen <git@modprog.de>
2021-04-30 09:19:43 -07:00
Wez Furlong
0316dfeb83 term can now notify application about potential title updates
When the title, icon, OSC 7 and SetUserVars sequences are processed,
notify the embedding application.

The gui layer uses this to trigger a titlebar update.

refs: #647
2021-04-30 07:28:02 -07:00
Wez Furlong
35eb7383b1 ci: simplify version number
Previously, we used `git describe --tags` to produce a version number
for non-released builds derived from the most recent tag + some info
such as the number of commits since that tag and then `g{HASH}`.

That always confuses people because the date portion at the front
looks old (it is typically the previous release) and the hash at
the end has that `g` in it.

This commit simplifies both the tag name used when making a release
and the computed version number take the date/time from the current
commit, and then append the hash.  That way the version number always
corresponds to a commit.

This scheme doesn't help detect situations where the commit is
dirty, but I don't think the old one would have helped with that
either.
2021-04-29 20:23:47 -07:00
Wez Furlong
94c98aa826 quickselect: fixup edge case with wrapped lines
the binary search would falsely extend the end of the match
to the start of the subsequent match for the wrapped line case.

The resolution is to emit a coordinate for the newline that we
add to the haystack between the wrapped lines.

closes: https://github.com/wez/wezterm/issues/732
2021-04-29 17:15:49 -07:00
Wez Furlong
d547f45714 avoid vanishing cursor when wrapped line is initially 0-width
refs #740
2021-04-29 16:06:43 -07:00
Wez Furlong
6d7f9879ac be more aggressive at pruning trailing blanks 2021-04-29 16:00:33 -07:00
Wez Furlong
7de7bf6b9e optimize render for blanks-after-clusters
In the situation where we have a full screen terminal (eg: 500 cells
wide), but very little output (eg: only 10's of columns on the left are
NOT blank), we would previously spend a non-trivial amount of time
calculating fg/bg colors for the blanks that trailed the actual
clusters; the calculation for each row was:

  O(trailing-blanks * full cell color compute cost)

which was around 30us per row.  For large numbers of rows this could
add up to >10ms per frame.

This commit changes the logic to run in two phases:

 * O(selection-width) with simple fg/bg color updates for the selection
   range

 * O(1) full cell color compute cost for the cursor if the cursor
   is somehow in the trailing blank region and not already handled
   by the earlier clustering logic.

With the sequence of recent commits, the frame time for the large
terminal case has been reduced from ~22ms to ~7ms, which is approx 3x
improvement.

refs: #740
2021-04-29 10:08:51 -07:00
Wez Furlong
b01193e1a5 cap typical blank line length to a reasonable value
This has the effect of reducing the memory and scroll cost
for lines that are shorter than the physical width of the
terminal matrix.

refs: https://github.com/wez/wezterm/issues/740
2021-04-29 09:03:58 -07:00
Wez Furlong
20a599a372 fix test compilation 2021-04-28 18:07:07 -07:00
Wez Furlong
f91ca30008 micro-optimize clustering
This improves it by ~4x for long lines, taking it from 120us to ~30us.
2021-04-28 08:25:07 -07:00
Wez Furlong
8953bff276 fonts: pre-size some vecs
micro optimization really
2021-04-27 22:39:32 -07:00
Wez Furlong
a2b068d59f fonts: remove some dead code 2021-04-27 22:24:43 -07:00
Wez Furlong
d6c8eb1e3b benchmarking shaping
`cargo test --release -p wezterm-gui -- --nocapture bench_shaping`:

```
running 1 test
100: 139.82µs
1000: 385.333µs
10000: 3.144203ms
test shapecache::test::bench_shaping ... ok
```
2021-04-27 21:48:15 -07:00
Wez Furlong
acb4df4934 term: clear mouse button when focus is lost
refs: https://github.com/wez/wezterm/issues/744
2021-04-27 08:38:40 -07:00
Wez Furlong
45262c3091 macos: fix numpad enter key reporting
refs: https://github.com/wez/wezterm/issues/739
2021-04-27 07:39:10 -07:00
Wez Furlong
e9fcc98d4a quickselect: allow pasting when typing the uppercase prefix
revise the colors to be a bit less glaring.

Updated the screenshot

refs: https://github.com/wez/wezterm/issues/732
2021-04-27 07:06:55 -07:00
Wez Furlong
bc6f93ccf0 docs: changelog for #742
refs: https://github.com/wez/wezterm/pull/742
2021-04-27 06:27:15 -07:00
Anthony Maki
26b66aad32 Updates NotoColorEmoji.ttf to asset provided at https://github.com/googlefonts/noto-emoji/releases/tag/v2020-09-16-unicode13_1 2021-04-27 06:24:04 -07:00
Wez Furlong
c4dc358282 add truncate_left_to_width
refs: #647
2021-04-27 06:23:19 -07:00
Wez Furlong
7e996950f6 add wezterm.truncate_to_width
refs: https://github.com/wez/wezterm/issues/647
2021-04-26 22:27:12 -07:00
Wez Furlong
d176af9c30 tidy up format-tab-title, add tab_max_width parameter
refs: https://github.com/wez/wezterm/issues/647
2021-04-26 21:43:30 -07:00
Wez Furlong
be9c60bfc8 removed tab_bar_style options in favor of format-tab-title
refs: https://github.com/wez/wezterm/issues/647
2021-04-26 20:16:47 -07:00
Wez Furlong
0f2f3734d9 add wezterm.column_width
refs: https://github.com/wez/wezterm/issues/647
2021-04-26 20:10:27 -07:00
Wez Furlong
3ad2a46ecf quickselect: avoid a panic when used with mux
It looks like the mux search results include a trailing newline
in some cases, which means that a match can wrap onto a second
line.

If that line is shorter than the label length, we could panic.

This commit makes quickselect safer to use in this situation,
but the real fix is with the mux search code.
2021-04-26 09:58:16 -07:00
Wez Furlong
d907b86a91 fixup captures in default quickselect patterns
Change some of the grouping to non-capturing expressions,
and remove redundant whole-expressing captures

refs: #732
2021-04-26 08:38:45 -07:00
Wez Furlong
9028da0a82 cargo update 2021-04-26 08:34:45 -07:00
Wez Furlong
32c2aa03d2 docs: third time's the charm! 2021-04-25 22:45:36 -07:00
Wez Furlong
5c96dab2e0 docs: fixup screenshot path 2021-04-25 22:38:52 -07:00
Wez Furlong
a554acc5d0 docs: add screenshot for quickselect 2021-04-25 22:36:41 -07:00
Wez Furlong
3028756ccb add tab_bar_at_bottom config option
closes: https://github.com/wez/wezterm/issues/278
2021-04-25 20:49:48 -07:00
Wez Furlong
f3679b024d fix mouse x position calc in tab bar
close: https://github.com/wez/wezterm/issues/677
2021-04-25 19:55:36 -07:00
Wez Furlong
f3706c706c de-hover tab when moving cursor down into the terminal
It's not perfect; this only handles the case where you move down
into the terminal.  I couldn't easily make the same thing happen
when moving the mouse up or left outside of the window.  It's
probably fixable but this is better than it was.

closes: https://github.com/wez/wezterm/issues/591
2021-04-25 17:01:21 -07:00
Wez Furlong
8ce376753f round out quick select mode
* Make alphabet and patterns configurable
* add docs
* Enhance scrollback search to support regex captures so that
  searching for eg: `fo(o)` will select the last `o` in `foo`.

refs: https://github.com/wez/wezterm/issues/732
2021-04-25 16:27:39 -07:00
Wez Furlong
87677a73bf Add support for iTerm2's SetUserVar escape
This doesn't propagate across wezterm's mux protocol
at this time.

refs: https://github.com/wez/wezterm/issues/647

https://iterm2.com/documentation-scripting-fundamentals.html#setting-user-defined-variables
2021-04-25 14:30:06 -07:00
Wez Furlong
1cb2856223 add hover parameter to format-tab-title
refs: https://github.com/wez/wezterm/issues/647
2021-04-25 13:53:06 -07:00
Wez Furlong
5b1631fe21 add quickselect overlay
This is the first pass implementation, drawing on the alphabet logic
and default patterns from tmux-thumbs (thanks @fcsonline!).

ctrl-shift-space pops up the quick select overlay.
Typing the highlighted prefix will select the matching text and
copy it as though the `Copy` key assignment was used.

TODOs are to make the alphabet and patterns configurable, as well
as write up some docs.

refs: #732
2021-04-25 11:52:14 -07:00
Wez Furlong
9cf1d8e826 fixup build on macos/windows 2021-04-25 09:13:28 -07:00
Wez Furlong
a69447fc2a nominally support toast notif timeouts
I've built this on linux, which doesn't respect the timeout.
I've made speculative changes that should build on mac and windows,
but that don't plumb the timeout functionality on those systems
as of yet.

refs: #619
2021-04-25 08:52:43 -07:00
Wez Furlong
5b281c42b9 docs: changelog for https://github.com/wez/wezterm/issues/729 2021-04-25 08:15:07 -07:00
Wez Furlong
053cb11e9f improve ssh domain support for ssh_config
This tidies up how we pass the ssh config to the connection ui
logic, by moving the ssh_config setup to the two callers.

A couple of notable adjustments:

* SshDomain::username is now optional; it will default to the
  values computed by the ssh config file loader
* no_agent_auth value wasn't hooked up to anything, but now it is

refs: https://github.com/wez/wezterm/issues/730
2021-04-24 21:56:32 -07:00
Wez Furlong
2c89e47f9e add force_reverse_video_cursor option
refs: https://github.com/wez/wezterm/issues/706
2021-04-24 21:16:58 -07:00
Wez Furlong
3df9527371 ssh: expand ~/ in ssh config
refs: https://github.com/wez/wezterm/issues/729
2021-04-24 19:25:51 -07:00
Wez Furlong
09e101c268 add format-tab-title event
refs: https://github.com/wez/wezterm/issues/647
2021-04-24 17:59:39 -07:00
Wez Furlong
e3fcdc9f36 add format-window-title event
This provides a flexible way for users to customize what gets
shown in the window title bar.

closes: https://github.com/wez/wezterm/pull/603
2021-04-24 16:47:26 -07:00
Wez Furlong
1f8908cddb fonts: revise cap_height adjustment
back out the portion of the cap height scaling that applied when
we knew the cap height of the primary font but not a fallback font.

That logic allowed some overly wide powerline fonts to be sized
correctly (a bit smaller), but also meant that a number of emoji
and other symbol glyphs were now undersized.

refs: https://github.com/wez/wezterm/issues/727
2021-04-24 12:02:52 -07:00
Wez Furlong
2520b6bd1d fontconfig: allow for undefined spacing case
I *think* the heart of the issue is that the problematic fonts
don't define a `spacing` property, and we were being stric
about matching it.

This commit changes the behavior to strictly match the spacing
value when it is defined, but to allow an undefined spacing
value to match.

refs: https://github.com/wez/wezterm/issues/726
2021-04-24 11:32:11 -07:00
Wez Furlong
e83d059fc7 couple of build tweaks for git versioning and macos build perf 2021-04-23 23:29:43 -07:00
Wez Furlong
87d49e45fc fix: multi-glyph tab titles
closes: https://github.com/wez/wezterm/issues/711
2021-04-23 22:51:53 -07:00