1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-19 03:11:31 +03:00
Commit Graph

1955 Commits

Author SHA1 Message Date
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
Wez Furlong
7de282fd07 mux: make Domain::attach an async fn 2020-01-16 15:55:15 -08:00
Wez Furlong
aeb91ff238 migrate more things over to the new spawn stuff 2020-01-16 10:31:53 -08:00
Wez Furlong
9ec4694d89 migrate some more code to the newer spawn mechanism 2020-01-16 09:15:07 -08:00
Wez Furlong
75eb16bec4 move spawn_task into a new promise::spawn module 2020-01-16 03:50:48 -08:00
Wez Furlong
ac3ccab1c5 window: adopt async_task for spawn_task 2020-01-16 01:31:28 -08:00
Wez Furlong
62f0f7a273 adopt async-task for muxserver task runner
This simplifies some of its code
2020-01-16 01:03:32 -08:00
Wez Furlong
2ce1cb018b cargo update to pick up filedescriptor 0.7.1
I got to the bottom of the hang on startup when trying to connect
to the multiplexer on windows and it was because of the change
in 367a44fb96 to try to drain the pollable
channel.

This mapped to ReadFile on windows which always tries to fill the buffer
even if it is a socket under the covers.

348421b010
teaches filedescriptor to use the recv/send if the filedescriptor is
really a socket and that resolves the hang.
2020-01-15 23:05:03 -08:00
Wez Furlong
256b4e6da8 fix pollable_channel to be non-blocking on Windows
Upgrade filedescriptor to 0.7 to use the portable helper for
setting non-blocking mode, and enable non-blocking mode on Windows.
2020-01-15 21:30:14 -08:00
Wez Furlong
101aedd6a5 remove .wait() from finish_attach
While debugging on windows earlier today I saw that we were
blocked on this wait on the main thread.  For whatever reason,
that only blocks in practice on Windows; I suspect that this is
due to a timing issue on windows where the server side takes
longer to respond than it does on posix.
2020-01-15 20:50:54 -08:00
Wez Furlong
4442e8030d mux: fix disconnect when a lot of output is dumped to the terminal
The root cause and secondary effect were a little surprising: the mux
pub/sub notification pipe filled up and because the mux notify routine
uses `retain` with the success of the send as a predicate it meant that
the full pipe resulted in the muxer killing that end of the subscriber
and that in turn made the ClientSession loop fail when it was
dispatching a notify on the other end, which terminated the loop and
disconnected the client.

Now, with this fixed, we have a flow control problem and the terminal
will remain busy with ctrl-c not being effective in the mux session.
2020-01-14 22:51:48 -08:00
Wez Furlong
3352013614 fix lingering selection when a row is changed
This was an accidental casualty of some recent refactoring;
we need to clear the selection range when lines that intersect
with it are changed, so that's what this does.

Fixes: https://github.com/wez/wezterm/issues/118
2020-01-14 22:21:25 -08:00
Wez Furlong
16c8957728 termwiz: fixup test case for 18bbd2ac6f 2020-01-14 22:09:33 -08:00
Wez Furlong
4b455288dd track the full current dir URL for OSC 7
Matching against the current dir when it includes a host and a
path seems like a handy way to automate selecting appropriate
theme/color/profile settings, so I'd like to make sure that
we have the full URL content available for that.

Refs: https://github.com/wez/wezterm/issues/115
Refs: https://github.com/wez/wezterm/issues/117
2020-01-14 22:06:13 -08:00
Wez Furlong
18bbd2ac6f termwiz: fixup input parser to match backspace/delete
With the changes in f0e94084d1 I
noticed that backspace and delete were inverted here in termwiz.

This diff adjusts the input parser to match.
2020-01-13 23:31:51 -08:00
Wez Furlong
724ad3a973 update changelog for latest release 2020-01-13 22:21:26 -08:00
Wez Furlong
ced85ac11b macos: teach it about the color schemes path in the .app bundle 2020-01-13 10:44:54 -08:00
Wez Furlong
bb6251fad9 prevent stats printing from interfering with cli proxy
This makes using stats with the mux possible again:

```
periodic_stat_logging = 10
```
2020-01-13 08:56:38 -08:00
Wez Furlong
c989485a77 mux: add basic version handshake at domain connect time 2020-01-13 08:10:23 -08:00