Commit Graph
537 Commits
Author SHA1 Message Date
Wez Furlong 74bbf01014 fix 'already borrowed' panic with large pastes 2019-06-02 13:00:30 -07:00
Wez Furlong bf719caaf3 allow using cmd-v to paste on linux
This is useful in a vmware vm on macos
2019-06-02 07:44:22 -07:00
Wez Furlong 71fd9c3ed7 thread palette through on each render call
This is slightly inefficient in that it copies the palette
for each call, so may want to revisit this if things feel
sluggish.
2019-06-01 16:07:08 -07:00
Wez Furlong 2ec436a4b9 make the frontends get the palette from the terminalstate
This isn't complete because it only copies it at startup
into the renderer.
2019-06-01 16:01:00 -07:00
Wez Furlong 038100922a clippy 2019-05-26 12:49:10 -07:00
Wez Furlong 607e180122 Range::contains is now stable; use it. 2019-05-26 11:40:33 -07:00
Wez Furlong 3f48387079 fixup mac build for extern crate changes 2019-05-26 09:21:58 -07:00
Wez Furlong e1a1530d22 remove boxfnonce: now require rust 1.35+
Rust can now naturally deal with with these constructs, so drop the
external crate.
2019-05-26 09:14:20 -07:00
Wez Furlong f87901c484 tidy up some failure usage 2019-05-26 08:58:59 -07:00
Wez Furlong a05bca460e fixup unused doc comment warning 2019-05-26 07:59:39 -07:00
Wez Furlong 7bf1d99d77 move pty to its own crate in preparation for publishing
Refs: https://github.com/wez/wezterm/issues/27
2019-05-19 18:40:26 -07:00
Wez Furlong c207142bcf Improve performance on windows
I noticed that things were feeling laggy in general and when I
added some debugging prints I noticed that we were getting a
continuous stream of CursorMoved events with the same coordinates
while the window had focus.

This diff short circuits mouse processing in that situation and
makes things feel a bit more snappy.
2019-05-18 19:15:04 -07:00
Mark Thomas 073f9fb1f8 use AtomicUsize::new(0) instead of ATOMIC_USIZE_INIT
Replace ATOMIC_USIZE_INIT with AtomicUsize::new(0) as the constant has been
deprecated in favour of calling the constructor.
2019-05-05 06:57:32 -07:00
Wez Furlong 70593c215f Prevent resizing smalling than 1x1
Fixes https://github.com/wez/wezterm/issues/25
2019-05-04 09:18:43 -07:00
Wez Furlong 9646e035df don't self deadlock when processing a lot of eg: resize events
This is fixed by allowing the gui thread to use an unbounded queue
of spawned functions, and keeping non-gui-threads bounded.
2019-05-04 09:07:43 -07:00
Wez Furlong 736f617f13 make the window close button kill the current tab 2019-03-25 22:14:19 -07:00
Wez Furlong 52be4c9ba7 remove use-winpty feature flag 2019-03-25 19:46:59 -07:00
Wez Furlong d040b94b62 add config option to select pty system 2019-03-25 19:35:13 -07:00
Wez Furlong cac06e5506 rename pty traits, make selectable via enum 2019-03-25 12:06:49 -07:00
Wez Furlong 10165fac32 traitify the pty module 2019-03-25 11:45:52 -07:00
Wez Furlong eeab341879 add use-winpty feature
When enabled, the windows version will use winpty rather than conpty.
This potentially allows running on older windows versions but has
a few caveats:

* Requires winpty.dll and winpty-agent.exe be in the PATH
* The initial screen / cursor position looks funky for me with the
  latest release of winpty, but that is from a couple of years ago
* Mouse reporting doesn't work, perhaps for the same reasons that
  it isn't working in conpty.

I want to make this into a runtime selectable feature before tidying
up the installation aspects; we need that plumbing anyway to be
able to select between local and remote mux'd tabs.
2019-03-25 09:21:00 -07:00
Wez Furlong 416311892b windows: extract Child 2019-03-25 07:25:43 -07:00
Wez Furlong 7875bc4e1a windows: extract winsize 2019-03-25 07:20:27 -07:00
Wez Furlong 08cb4af6f4 windows: factor out command builder 2019-03-25 07:17:15 -07:00
Wez Furlong 9a9d15f15a pty: restructure to make it easier to share code between conpty, winpty 2019-03-25 07:01:09 -07:00
Wez Furlong 6c6bc43737 move OwnedHandle to its own module 2019-03-25 00:26:37 -07:00
Wez Furlong 4839e94c7e windows: stub out a winpty wrapper
conpty, while it may be the best native API available for consoles
built in to Windows 10, currently swallows mouse escape sequences
(https://github.com/Microsoft/console/issues/376) so we need an
alternative for a better windows experience.

winpty appears to be a reasonably mature pty implementation, so
let's try that!

I tried to use winpty-sys from crates.io but it requires the
installation of an external clang compiler so I used bindgen
on my linux box to convert the small header file to rust and
then tweaked it a bit.

This commit includes that basic wrapper plus a type safe layer
on top.

This will require distributing the dll and an agent helper along
with the wezterm.exe.

This commit doesn't implement the wezterm side of the pty interface;
that will be in a follow up commit.
2019-03-25 00:15:44 -07:00
Wez Furlong a56f37598c Embed icon into windows executable and titlebar
This also applies to X11 when using the glutin frontend
2019-03-24 19:08:07 -07:00
Wez Furlong 00442cd6c8 Build a windows subsystem app on windows 2019-03-24 10:30:36 -07:00
Wez Furlong 45c1f5b4f3 cleanup travis config, re-enable cargo test --all
Streamline the travis deploy builds; when TRAVIS_TAG is set
we'll run `--release` builds.

Don't error out in fontconfig/build.rs if fontconfig is not
installed.  This makes it possible to `cargo test --all` again
on the mac at the cost of potentially making it harder to troubleshoot
problems with not having fontconfig installed on linux.
However: the get-deps script is responsible for installing that.
2019-03-24 08:45:28 -07:00
Wez Furlong d80f58f7bc use vergen to embed the git version info in the output 2019-03-23 23:45:14 -07:00
Wez Furlong 2184a393c5 fix compilation on linux 2019-03-23 19:08:22 -07:00
Wez Furlong 67a57f12af Add basic install script and icon
The icon comes from "Smoothicons 7" by Corey Marion which I found
as a royalty free icon searching the internet.  I would love to
have a purpose built icon, but this is sufficient for now.

The install script sets up a macOS application bundle that references
the generated wezterm binary and the icon.  The same technique could
be used to generate a .desktop file for linux.

I've changed the default-prog on macos to be `login -pf $USER` as
that is a better default experience on macOS.
2019-03-23 18:41:10 -07:00
Wez Furlong 967d43d57c dynamically load conpty functions on windows
This allows travis to build and run tests, even though it can't run
the full gui.
2019-03-23 17:07:10 -07:00
Wez Furlong acc895f1cd avoid deadlock while pasting large chunks of text
A big paste could saturate the input/output of the pty and
lead to an effective deadlock; the application wants to send
output to us but we are busy trying to write the paste to it.

Break up large pastes into chunks and send them piece by piece.
This does mean that a large bracketed paste is not an atomic
unit any longer, but it seems to work out ok when pasting into
vim.
2019-03-23 15:25:49 -07:00
Wez Furlong 10b3460c49 remove rusttype 2019-03-23 13:45:26 -07:00
Wez Furlong ed2e407df1 enable harfbuzz on windows 2019-03-23 11:53:45 -07:00
Wez Furlong 27cb18f8ae Build our own freetype, harfbuzz
This is primarily for macos where the default freetype
installation is unable to render color emoji, but should also
help make things more consistent across the various platforms.

It's a little bit awkward on linux because the font-loader crate
pulls in the now-conflicting servo-font* crates.  I've disabled
font-loader on linux systems; it's just calling fontconfig under
the covers anyway.
2019-03-23 09:28:40 -07:00
Wez Furlong 5533eaeba2 disable coretext by default on macos
freetype renders better for now
2019-03-22 21:14:37 -07:00
Wez Furlong 7514010d09 make wezterm with no args behave like wezterm start 2019-03-22 21:12:21 -07:00
Wez Furlong 9fdc420faf use floats for metrics
The aim was to get to the bottom of why the coretext rendering seems
a bit off; the theory was that it was due to integer rounding somewhere,
but it seems that I still haven't gotten to the bottom of it here.
2019-03-22 20:41:50 -07:00
Wez Furlong 93020c7553 bump glutin sync channel size
This is a workaround; need to remove the sync restriction when
queuing up work from the gui thread as I occasionally deadlock
myself.
2019-03-22 20:41:50 -07:00
Wez Furlong 6cbb3ba432 impl IRM insert mode and improve esctest conformance
I've had mixed results with esctest; the IRM and cursor save/restore
tests fail for me in terminal.app, iterm2 and xterm, and fail in the
same way on wezterm, so I'm not sure if I'm not running those tests
correctly.  However, they did encourage the discovery of some other
real issues in the wezterm emulation.
2019-03-22 20:41:50 -07:00
Wez Furlong ff64ba727b fix Executor names copypasta 2019-03-22 20:41:50 -07:00
Wez Furlong 1c06430b3a Add Null frontend; intended for testing purposes 2019-03-22 20:41:50 -07:00
Wez Furlong cdd0735357 quell warning 2019-03-22 20:41:50 -07:00
Wez Furlong 46cd26a421 de-dup shader sources
They only vary by version, so simplify this a bit
2019-03-22 20:41:50 -07:00
Wez Furlong a4a078cf98 Employ zstd compression for large pdus
This cuts down the coarse data from ~13k to ~200 bytes
2019-03-22 20:41:50 -07:00
Wez Furlong 2077e3fd21 use varbincode for mux protocol; results in ~3x smaller packets
Reduces the size of the full screen serialized size from 40k -> 13k.

Note that the `zlo` crate (which doesn't appear to have a repo
on github any longer; sources are only found in the crates.io
documentation source view), employes zigzag encoding of all integers
and floating point values and takes the size down to just under 10k.

A todo is to follow up on that and see if we could adopt the same
scheme in varbincode.
2019-03-22 20:41:50 -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