1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-19 18:57:59 +03:00
Commit Graph

1973 Commits

Author SHA1 Message Date
Wez Furlong
1fe9e16f25 refactor ssh connection ui into its own module
I want to re-use this for the mux client
2020-01-25 15:10:34 -08:00
Wez Furlong
fd8f28960f ssh: use a single window for authenticating a session
This makes it so that we preserve context while showing the connection
status and authentication prompts.
2020-01-25 13:00:16 -08:00
Wez Furlong
1ef95b917a do a better job at tearing down termwiztermtabs
This avoids lingering on shutdown after showing one of these windows.
2020-01-25 12:59:28 -08:00
Wez Furlong
a1b9d04709 Update structopt to 0.3 2020-01-24 21:49:42 -08:00
Wez Furlong
4f08d010b7 move unix listener to its own module 2020-01-24 19:31:04 -08:00
Wez Furlong
df58a12827 deps: update to ssh2 0.7.0 2020-01-24 17:49:37 -08:00
Wez Furlong
ee1c335703 ssh: canonicalize line endings for prompt text
We most likely get instructions with unix line endings, but the
termwiz surface wants canonical CRLF, so fix that up.
2020-01-24 16:41:23 -08:00
Wez Furlong
b58a4e251c CI: remove --target from windows build
I'd like to try to converge on fewer differences in the workflow files,
so let's see if this works.
2020-01-24 16:28:24 -08:00
Wez Furlong
a2ad333f43 CI: target older macos versions
I'm just randomly picking 10.9 to see if it even builds... if that
doesn't work out I'll probably just pick 10.14

refs: https://github.com/wez/wezterm/issues/128
2020-01-24 16:24:45 -08:00
Wez Furlong
8eb5a0e72c ssh: fix for sites that use 2fac 2020-01-24 16:08:20 -08:00
Wez Furlong
b59893fd9f ssh: allow a number of auth retries
Rather than just a single attempt at each mechanism, let's allow up
to 3 loops, each time trying all supported mechanisms.  This helps
for the case where the user makes a typo with their password, and
should also help for more complicated auth setups where succeeding
with one mechanism may not be sufficient.

While testing this out I noticed that were deferring closing the
OS level window until after the entire auth attempt, so I added
some logic to proactively close the prompt windows.  In the longer
term I'd like all related prompts to render in the same window
for improved cognotive continuity.
2020-01-24 08:39:34 -08:00
Wez Furlong
970e4a8e64 ssh: try password auth before keyboard interactive
This may help for sites that use 2fac; after entering the password
correctly, the 2fac prompt may appear.
2020-01-24 00:04:37 -08:00
Wez Furlong
e45bace9eb shift-space now emits space
This isn't a 100% righteous fix, but is sufficient to reduce
the irritation in refs: https://github.com/wez/wezterm/issues/126

The full fix is pending another round of review of the CSI-u stuff
in refs: https://github.com/wez/wezterm/issues/63
2020-01-23 23:29:42 -08:00
Wez Furlong
ffa00bef29 pty: the compiler needed these types for macos
I don't know why this only was a problem on macos, but this fixes
the release build for me on my macos.
2020-01-23 10:50:34 -08:00
Wez Furlong
ae2bcb0207 adjust appimage filename for nightly builds
They shouldn't have the hash in the nightly build
2020-01-20 23:34:50 -08:00
Wez Furlong
cb89ec73e3
First pass at building an AppImage (#125)
refs: https://github.com/wez/wezterm/issues/124
2020-01-20 23:11:38 -08:00
Wez Furlong
d84e8531a3 pty: implement awaitable conpty for windows
A bit of a PITA, but it appears to be functional
2020-01-20 15:23:56 -08:00
Wez Furlong
ca836ff95b pty: unix: add awaitable interface 2020-01-20 15:23:55 -08:00
Jun Wu
70e9c7cb16 Make Shift+LeftClick extend existing selection
This matches cmd.exe and other programs (notepad, office, etc) behavior:
First click selects "start", then Shift+click selects "end". They form
a range.

This is particularly useful to select a large range of text, since the
user can release the left button, then operate on the scroll bar without
worrying about messing up text selection.

It gets a bit more complicated with the POSIX "mouse grabbed" situation.
When the mouse is grabbed, it's usually a full-screen ncurses-like
application. Selection mostly likely only makes sense within a single
screen. So Shift + LeftClick just works as starting a selection in this
case (otherwise it'll be hard to clear a selection).
2020-01-20 15:18:36 -08:00
Jun Wu
511fc55b10 Respect wheel scrolling speed settings on Windows
The default values are 3 lines. With this change, scrolling speed now seems
similar to other programs like cmd.exe. Before this change it feels too slow.
2020-01-20 15:18:33 -08:00
Jun Wu
ff6ff649af Make mouse wheel scroll smooth on Windows
I noticed my trackpoint or touchpad reports a lot of < 120 (WHEEL_DELTA) events.
They shouldn't be ignored.

Also https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousewheel says:

> The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120.
> This is the threshold for action to be taken, and one such action (for
> example, scrolling one increment) should occur for each delta.
>
> The delta was set to 120 to allow Microsoft or other vendors to build
> finer-resolution wheels (a freely-rotating wheel with no notches) to send
> more messages per rotation, but with a smaller value in each message. To use
> this feature, you can either add the incoming delta values until WHEEL_DELTA
> is reached (so for a delta-rotation you get the same response), or scroll
> partial lines in response to the more frequent messages. You can also choose
> your scroll granularity and accumulate deltas until it is reached.
2020-01-20 15:17:44 -08:00
Jun Wu
6f3c52f5d3 Fix IME position on Windows
The IME position is related to on-screen Window, not the
off-screen buffer.

    Buffer
    +- 0
    |
    |                    Window
    |                    +- 0
    |                    | (Tab bar)
    +- 20 physical_top   +- 1
    |                    | (Terminal view)
    |                    |
    |                    |
    +- 30 cursor.y       +- 11 Correct IME position
2020-01-20 13:58:21 -08:00
Jun Wu
dba0fdd94f Drop an unused &mut 2020-01-20 13:58:21 -08:00
Jun Wu
b5c3734f3d Make rustfmt happy about "async move"
Without this I cannot rustfmt a file I touched later.
See https://github.com/rust-lang/rustfmt/issues/3149
2020-01-20 13:58:21 -08:00
Wez Furlong
118b91bdf6 pty: fix windows build 2020-01-20 08:20:38 -08:00
Wez Furlong
82c824f371 pty: remove conpty support
It's too fiddly to setup in practice, and literally no one has
expressed an interest in using it.

Removing it simplifies some upcoming work.

Closes: https://github.com/wez/wezterm/issues/35
2020-01-20 07:55:51 -08:00
Wez Furlong
ec082bec31 split ClientSession out of the main listener module 2020-01-20 07:55:51 -08:00
Wez Furlong
36656585a2 move UmaskSaver to its own file 2020-01-20 07:55:51 -08:00
Wez Furlong
7688d669d7 read_bytes -> std::fs::read 2020-01-20 07:55:51 -08:00
Wez Furlong
22622219c7 refactor: move listener and tls bits into own files 2020-01-20 07:55:51 -08:00
Wez Furlong
1d9678706c promise: add tokio_spawn helper
This starts up the tokio runtime on a secondary thread
and spawns a future into it.
2020-01-20 07:55:51 -08:00
Wez Furlong
7aa0994b0f termwiz: lineedit: replace a println with render/flush
The terminal may not be attached to stdout, so the println isn't
appropriate.
2020-01-20 07:55:51 -08:00
Wez Furlong
d644a78699
take a stab at fixing the windows CI to generate 64-bit (#120)
* take a stab at fixing the windows CI to generate 64-bit

* use actions-rs/toolchain more broadly

* fixup target dir for deploy script

* cut over to the rust action for installing rust
2020-01-19 15:38:24 -08:00
Wez Furlong
894e971e25 Show a window with the full error message for failed config load
This is a very basic first approximation for the feature discussed
in the associated github issue.

Refs: https://github.com/wez/wezterm/issues/80
2020-01-17 18:47:02 -08:00
Wez Furlong
51545ab099 termwiz: windows: normalize SHIFT+ASCII
This makes the input behavior consistent with posix: if SHIFT is held
and a letter key is pressed, make sure that we treat that as the ascii
uppercase version of that key and that the SHIFT modifier is cleared.
2020-01-17 16:56:29 -08:00
Wez Furlong
fd87e7c9a0 Revert "ensure that the CI targets 64 bit systems on windows"
This reverts commit c65dac6a2f.

CI seemed unhappy and I don't want to debug this right now.
2020-01-17 16:41:36 -08:00
Wez Furlong
c65dac6a2f ensure that the CI targets 64 bit systems on windows 2020-01-17 15:04:44 -08:00
Wez Furlong
ee7eefe0a3 bump upload release assets version
Not sure if this will help with overnight CI flakeyness, but worth a
shot!
2020-01-17 15:02:19 -08:00
Wez Furlong
e823207809 mux: avoid deadlock when remote has grabbed the mouse 2020-01-17 12:13:36 -08:00
Wez Furlong
dc0573457c windows: fix compilation for 32-bit target
The CI shouldn't be trying to build this, but this is what was blocking
its builds on windows.
2020-01-17 10:12:25 -08:00
Wez Furlong
5ffd703d92 cargo update
The windows build failed with a weird error on CI but is fine locally.
Maybe this will help?
2020-01-17 09:54:14 -08:00
Wez Furlong
2eed9d67f4 fixup windows build 2020-01-17 09:23:30 -08:00
Wez Furlong
a9b50267e9 avoid pruning windows/tabs while user activity is in progress
This caused "window removed" messages to appear in the log for some
slow/broken muxer configurations, which then masked surfacing of
the real problem.
2020-01-17 09:02:42 -08:00
Wez Furlong
b058ac9170 there's no such thing as an acquire store... 2020-01-17 09:02:16 -08:00
Wez Furlong
27d58ae371 promise: remove Executors 2020-01-16 23:29:42 -08:00
Wez Furlong
55e1cceb87 remove more Executors 2020-01-16 23:27:54 -08:00
Wez Furlong
efd1db8581 simplify frontend layer
remove the executor bits that now reside in promise::spawn
2020-01-16 23:17:01 -08:00
Wez Furlong
b295575953 tidy up wezterm cli list
There's a panic during shutdown that needs to be run down though
2020-01-16 23:06:25 -08:00
Wez Furlong
c3bee703bb asyncify the client rpc methods + fanout 2020-01-16 22:49:01 -08:00
Wez Furlong
e814bc4267 mux: Domain::spawn is now async
This was another source of hanging on windows with connecting to a unix
domain.
2020-01-16 16:36:27 -08:00