1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 06:42:12 +03:00
Commit Graph

128 Commits

Author SHA1 Message Date
Wez Furlong
607e180122 Range::contains is now stable; use it. 2019-05-26 11:40:33 -07:00
Wez Furlong
8a76f27f9b remove some extern crates
These got overlooked when migrating from 2015->2018 edition syntax.
2019-05-26 08:27:43 -07:00
Mark Thomas
6ef1ad3a56 set cursor shape while repainting
When repainting the screen, we must be sure to set the cursor
to the right shape.

While the repaint is happening, hide the cursor to prevent
the cursor jumping around while the repaint happens.
2019-05-18 09:12:47 -07:00
Mark Thomas
111f42cf7b join lines with CRLF when fully repainting surface
When repainting a surface, we optimize for the case where lines are simple text
by combining the the `Change::Text` for the end of the previous line and the
start of the next line into a single `Change`.

The assumption about relying on automatic margins is incorrect.  We can't rely
on them, as they might be disabled, and in any case they are no use if the
previous line was shorter than the full width of the screen.

This results in the lines appearing joined together on a single line.  This is
evidenced in the existing tests where `"hel\nw"` becomes `"helw"` on a full
repaint.

The solution is to always inject a real CRLF by adding a `CursorPosition` change.
This replaces any CRLF that may have been swallowed by the `Surface` when it
added the original changes.
2019-05-18 09:12:47 -07:00
Mark Thomas
7c6cf297a6 add scrolling of regions
Add two new `Change` variants: `ScrollRegionUp` and `ScrollRegionDown`, which
scroll part of the screen up or down by a number of lines.

On Unix, these are implemented using the `change_scroll_region` and
`parm_index`/`parm_rindex` terminfo capabilities if available.  If `parm_index`
or `parm_rindex` are not available, but `scroll_forward` or `scroll_reverse`
are, then these are used repeatedly to get the same effect.

On Windows, these are implemented using `ScrollConsoleScreenBuffer`.
2019-05-18 09:12:46 -07:00
Wez Furlong
3777da13d2 fix deprecation warnings 2019-03-22 22:17:54 -07:00
Wez Furlong
fe7502fc0b implement coarse tab data rpc PoC
This required switching away from Rc to Arc so that the data in the
client can transit between threads.

This isn't useful yet.
2019-03-22 20:41:50 -07:00
Wez Furlong
7cdd1876d1 Enable serializing various Line and Cell related structs 2019-03-22 20:41:50 -07:00
Wez Furlong
86ed003428 factor out diff state local vars, add diff_lines method
The intent is to use this together with the terminal emulator;
when running the mux we'd like to use the Surface change stream.
2019-03-22 20:41:50 -07:00
Wez Furlong
ab0c5a8017 whoops, fully undo the half-hearted attempt to address the todo in here
The saturating_sub was going to be an attempt at the look-back alluded
to in the TODO comment, but I decided not to implement that in this
iteration.

The effect of this was that double clicking the `m` in a sequence like
` master` would only select the `m` instead of the `master` string.
2019-02-24 13:17:42 -08:00
Wez Furlong
184befae09 adjust double-click selection class
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.
2019-02-24 13:13:35 -08:00
Wez Furlong
dba88d2102 clippy 2019-02-24 12:01:08 -08:00
Wez Furlong
819bc247a0 micro optimize clearing a line
Turns out to be faster to clear and then resize than it is to
resize down and manually assign the elements
2019-02-22 21:52:18 -08:00
Wez Furlong
7e38628486 update termwiz to 2018 edition 2019-02-18 23:26:41 -08:00
Wez Furlong
2db17562a6 rustfmt 2019-02-16 00:08:38 -08:00
Wez Furlong
61fec42216 cargo fmt with current stable rustfmt 2018-09-19 20:06:31 -07:00
Wez Furlong
9219dbb327 We can now take iterm images into the wezterm terminalstate
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.
2018-08-08 09:00:07 -07:00
Wez Furlong
a267ebb576 add theoretical support for storing Images in the Surface
There's basic rendering also, but it is not complete.
Needs more tests; will come back to those once more scaffolding
is in place.
2018-08-08 07:07:31 -07:00
Wez Furlong
cee63e74e1 consolidate term::Line -> termwiz::Line 2018-08-05 12:37:01 -07:00
Wez Furlong
2c7a27c42a move CellCluster to termwiz 2018-08-05 12:10:50 -07:00
Wez Furlong
d7943681de add check for lines with hyperlinks 2018-08-05 09:49:47 -07:00
Wez Furlong
12db6e4629 add implicit hyperlink creation to termwiz 2018-08-05 09:36:29 -07:00
Wez Furlong
18f34545b3 rustfmt 2018-08-05 09:14:40 -07:00
Wez Furlong
e2461b2380 add concept of implicit hyperlink to termwiz
Moves that functionality from wezterm+term into termwiz
2018-08-05 09:13:55 -07:00
Wez Furlong
92f59f243e add state bits to surface::Line
Starting to migrate term::Line functionality over
2018-08-05 08:45:36 -07:00
Wez Furlong
cbe4a2e3bc move surface::Change to its own module 2018-08-05 08:26:06 -07:00
Wez Furlong
e781fdd43b move surface::Line into its own module 2018-08-05 08:25:42 -07:00
Wez Furlong
72d88091bc move surface in preparation for splitting it up 2018-08-05 08:08:39 -07:00