1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-27 15:37:29 +03:00
Commit Graph

5575 Commits

Author SHA1 Message Date
Wez Furlong
1500063c96 Start adding hyperlink support code 2018-02-10 15:12:21 -08:00
Wez Furlong
76fe17b20b Cell is no longer Copy
This will support Cells owning `Rc<>` to things like hyperlink
data or image data.
2018-02-10 09:52:14 -08:00
Wez Furlong
629a12a3a0 address a minor todo re: alt screen 2018-02-10 09:50:33 -08:00
Wez Furlong
6af3b63d57 make scrollback size configurable 2018-02-10 09:43:54 -08:00
Wez Furlong
beeaacfabc fixup some bad math for under-width ligatures
We were panicking when rendering the || ligature, which is narrower
than we were expecting.  There was also a weird looking assert
that was triggering if we got path the math overflow.
2018-02-10 09:27:59 -08:00
Wez Furlong
3c43a13f61 fix link in readme? 2018-02-10 08:43:36 -08:00
Wez Furlong
feda4eaace fix typo, linkify config.rs 2018-02-10 08:42:10 -08:00
Wez Furlong
d0fe1e3ae7 fix tabs, ugh 2018-02-10 08:37:40 -08:00
Wez Furlong
6b182ffe52 implement an equivalent to xterm*boldColor
I love my tomato bold!
2018-02-10 08:36:34 -08:00
Wez Furlong
3075e47c89 Allow configuring colors 2018-02-10 08:16:20 -08:00
Wez Furlong
4ce67c7f9a Use the palette crate for blending
I wasn't pleased with how text was rendering on a colored background,
and after some research I discovered that I was neglecting to convert
from sRGB to a linear RGB colorspace, and that this was causing the
blending to have inaccurate results.

This diff pulls in the palette crate to handle the heavy lifting.
It doesn't appear to have any especially fast optimizations for this
though, which is a shame because the blending code I was using
previously was largely integer math with few branches.  The colorspace
conversion has several floating point operations and branches that
are unavoidable :-/

We run a bit hotter on the CPU but the results are much more pleasing
to the eye.
2018-02-09 23:32:35 -08:00
Wez Furlong
6c75ff4146 Use brighter version of ANSI color when bold enabled
This is one of the main reasons that I started to build my
own terminal emulator :-p
2018-02-09 20:54:17 -08:00
Wez Furlong
7ab462f2bd fixup alt-KEY to send escape rather than set bits 2018-02-09 16:03:09 -08:00
Wez Furlong
d289906dbc Add double click to select a word 2018-02-09 15:47:41 -08:00
Wez Furlong
a28b5f5390 add triple-click to select a line 2018-02-09 08:19:10 -08:00
Wez Furlong
1619f786a9 Add somewhat primitive text selection for copy/paste 2018-02-08 21:35:26 -08:00
Wez Furlong
8edde0d073 update readme for more recent tweaks 2018-02-07 20:18:24 -08:00
Wez Furlong
4338eecc3f Allow not specifying font_rules in the config file 2018-02-07 15:42:12 -08:00
Wez Furlong
6dd0312980 Don't clip off the last couple of glyph pixels
This is most noticable with a cursive italic font.  When we
were dividing the glyph into cell slices, we could leave off
a 2 pixel wide strip from the last of the sequence and this
looked nasty.

This diff also adjusts come calculations to use the width and
height from the current TextStyle.  Whether this is more or
less correct remains to be seen :-p
2018-02-07 15:31:37 -08:00
Wez Furlong
edd5911535 Add a small font styling engine
This enables selecting an italic font when the cell is italic,
but has more power beyond just that simple property.

This runs a little hot on the CPU so there's probably some caching and
tweaking that can be done to make the evaluation a bit cheaper.
2018-02-07 09:23:24 -08:00
Wez Furlong
4d03fce569 tweak note 2018-02-07 07:53:51 -08:00
Wez Furlong
7ade4434fe Add basic config file parsing
So that we no longer assume Operator Mono SSm.
We now default to `monospace`.  I just tried this and the font metrics
appear to be wonky, so there's some tweaking to do.
2018-02-07 07:51:04 -08:00
Wez Furlong
401530a899 lookup the $SHELL for the user rather than assume zsh 2018-02-06 22:48:28 -08:00
Wez Furlong
a78efced1c Meh, TravisCI Ubuntu is too old. 2018-02-06 22:24:36 -08:00
Wez Furlong
b0e8e2bfeb tweak travis config 2018-02-06 21:55:52 -08:00
Wez Furlong
7229de2ce6 Add a travis config 2018-02-06 21:44:26 -08:00
Wez Furlong
38bfd8bdc9 flesh out some details prior to pushing to github 2018-02-06 21:32:40 -08:00
Wez Furlong
532cf28782 add support for setting the primary selection 2018-02-06 20:40:46 -08:00
Wez Furlong
7657a91188 refactor to make it easier to use and extend TerminalHost 2018-02-05 08:52:35 -08:00
Wez Furlong
a4c7de7b9b We now support shift+insert to paste the selection 2018-02-05 08:22:08 -08:00
Wez Furlong
b24ac14c05 Add TerminalHost trait
This will make it easier to add copy/paste handling in a follow up.
2018-02-04 22:35:33 -08:00
Wez Furlong
5261f9f3d8 Enable mouse reporting
There's a bit of restructuring of XCB event handling going on to enable
this, and we only support SGR reporting at the moment.
2018-02-04 20:53:03 -08:00
Wez Furlong
f89d37401b Enable viewing the scrollback
Both mouse wheel and shift+{PageUp,PageDown} can be used to adjust
the scroll viewport.
2018-02-04 14:19:12 -08:00
Wez Furlong
0bec822f75 create the palette when we create the window
Rather than every time we paint and resize
2018-02-04 09:19:25 -08:00
Wez Furlong
09c70930b9 improve resize handling
Both in terms of resizing the window and running the `resize` utility.
2018-02-04 09:17:05 -08:00
Wez Furlong
4c8e3ffd75 improve clustering and cursor rendering
We weren't quite right with handling the cursor around double-width
characters.  We're now a bit more robust at this because we're
clustering and taking pains to consider the printable width of the
cell as well as the width of the shaped (eg: with contextual ligatures)
glyph.

There may still be issues with contextual ligatures of length 3,
but I haven't managed to nail down exactly the issue yet.
2018-02-04 08:28:32 -08:00
Wez Furlong
78c2df34fc use Range for scroll region 2018-02-02 09:02:30 -08:00
Wez Furlong
904f8fc059 better typing for rows and cursor position 2018-02-02 08:16:07 -08:00
Wez Furlong
c63c39409a use Position for line positioning CSIAction's 2018-02-02 07:35:08 -08:00
Wez Furlong
d152055700 reduce the variations on set/delta for cursor positioning 2018-02-02 00:46:04 -08:00
Wez Furlong
bb186da400 avoid eagerly casting some parsed sequences to usize
This helps to avoid unexpected integer overflow
2018-02-02 00:23:30 -08:00
Wez Furlong
25773466fb add a couple of sequences used by tmux when man is running 2018-02-01 07:42:16 -08:00
Wez Furlong
5cdb5149c3 suppress keypress debug prints 2018-02-01 00:26:01 -08:00
Wez Furlong
1cc180b813 test and fix a scrolling related bug 2018-02-01 00:22:33 -08:00
Wez Furlong
622c573201 fix boundary issue when scrolling and scrollback exceeded 2018-01-31 21:26:05 -08:00
Wez Furlong
e7e0aeebc2 Add support for cursor keys 2018-01-31 20:31:06 -08:00
Wez Furlong
a49e4b653b fix an issue with CR processing
This eliminates the zsh reversed % artifact issue.

Added a feature flag to turn on diagnostics even in release mode;

`cargo run --release --features debug-escape-sequences`
2018-01-31 19:00:15 -08:00
Wez Furlong
659ce4fc2d Make answerback more generic, enable title changing 2018-01-31 15:15:23 -08:00
Wez Furlong
11e6d538fc move term to its own crate
This makes it harder to accidentally violate separation of concerns.
2018-01-31 10:50:21 -08:00
Wez Furlong
4dcab21a97 placeholder for alt graphics mode
These are emitted by `top`
2018-01-31 10:15:39 -08:00