My original idea was that I would centralize of the key binding
logic in the terminalstate, but this places a bit of a burden on
the TerminalHost portion of the interface.
In particular: when running a multiplexer server we may be headless
or have multiple heads. In that scenario we want the terminal
to be backed by a virtualized screen, and that means removing
the direct callback to access eg: the host clipboard. This
diff is the first of a couple that have the goal of removing
those sorts of dependencies.
This is an unfortunately large diff that:
* Separates Tab ownership from TerminalWindow
* Introduces a Mux container for all of the tabs in the application,
across all windows
* Moves ownership of processing pty responses to the mux; it sets
up and has logic to process data for the ptys and apply to the
tabs
I've moved the logic for processing new tab and new window hotkeys
to the TerminalWindow's themselves as we need some context to
associate the tab with the right window and to create a new window.
I think that will simplify and allow unifying more code.
previously this just used unicode word segmentation rules, but that
is insufficient for most technical users.
Change this to look for sequences that are non-whitespace and not
enclosed by bracket/quote delimiters. This allows selecting file names
with a double click, which was my main issue.
There isn't really any reliable consistency in the virtual_keycodes
being set for simple keys or shifted keys, so we need to go all in
and add our own scancode processing as a fall back.
This makes it even harder to process unicode input, particularly
because we have no idea whether a ReceivedCharacter event will
follow.
We don't yet have any code to render them, and the vte parser seems
to truncate incoming image sequences ~1kb in size, so more work is
needed to make this useful.
We were deleting the current row and below rather than the rows below.
This was the cause of lines going blank during `apt upgrade` runs;
the line just above the bottom would get erased instead of scrolling
up.
I found this by running the termwiz widget demo; the top line was being
erased by mistake.
The issue here was that we were not updating the tab stops when making
the window larger. This had the side effect of causing the cursor to
move in unexpected ways when tabbing to the right.
Fixes: https://github.com/wez/wezterm/issues/13
When using the default monospace font on ubuntu (typicaly
DejaVuSansMono), the texture atlas would end up the bottom left pixel
being a shade of gray.
Since we were using (0,0) coords for whitespace cells, all whitespace
cells would appear shaded gray.
We now reserve a black pixel in the bottom left of the underline texture
and switch to that for whitespace instead.
I added Debug support to the ColorPalette while tracking this down,
and figured that I might as well keep it.
If the user enlarges the terminal we can have regions of the vertex
buffer that have colors that default to alpha channel 0. This is
normally fine but breaks rendering of the cursor and the selection;
those attributes are out of band from the normal cell attributes,
especially for whitespace cells, so we need to handle those in
the degenerate case at the end of a line render.
Refactor the code that computes the cursor and selection colors
so that we can call it and use it in both places.
We were marking the entire scrollback history as dirty on each line
scroll. This was from the early days and isn't needed any more.
This brings the runtime of:
```
$ find /usr > /tmp/usr-files.txt
$ time cat /tmp/usr-files.txt
```
down from ~2.5s to ~1.2s.
Also avoid a redundant line_mut() call in set_cell().