Commit Graph
6487 Commits
Author SHA1 Message Date
Wez Furlong 0f3869be16 lineedit: implement ctrl-k and fixup deletion of emoji 2019-05-27 08:17:24 -07:00
Wez Furlong 8a44344937 lineedit: split out action and movement concepts
This makes it a bit easier to implement more key bindings and
to make them configurable in the future
2019-05-27 08:02:38 -07:00
Wez Furlong 8a74eff72e lineedit: add ctrl-L repaint/refresh binding 2019-05-27 07:14:39 -07:00
Wez Furlong 90fece7b27 fixup windows build 2019-05-26 23:02:50 -07:00
Wez Furlong cd027430db fixup tests 2019-05-26 22:58:38 -07:00
Wez Furlong b1af0cefbd tidy up the line editor interface and docs a bit 2019-05-26 22:52:07 -07:00
Wez Furlong 5dd0e39b05 termwiz: improve line editor
Move the cursor to the correct column when emoji are input.
Add some docs.
2019-05-26 22:39:50 -07:00
Wez Furlong 4fe790dd0c add cursor movement, deletion 2019-05-26 22:04:47 -07:00
Wez Furlong 07910f1d59 disable mouse input in line editor example 2019-05-26 21:20:43 -07:00
Wez Furlong 6d243ec1f1 termwiz: add very basic line editor 2019-05-26 21:10:37 -07:00
Wez Furlong cc0d2e5493 termwiz: fixup key_tester example on macOS
We need to set the terminal to blocking mode when we want poll_input
to block forever, otherwise we immediately receive WouldBlock error
response and quit the program.
2019-05-26 19:01:03 -07:00
Wez Furlong 0bb3714435 improve double-click selection of wrapped lines
This one has been bugging me for a while; we now know when we've
wrapped a line and can join it without a line break when double-clicking
to select a word.

This commit introduces a wrapped attribute to help record this
information, which could potentially help with when it comes
to looking at nicer resize behavior in refs: https://github.com/wez/wezterm/issues/14
2019-05-26 16:05:51 -07:00
Wez Furlong 09f168a0db plumbing for double click selection of wrapped lines 2019-05-26 14:52:03 -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 e5fe668bbc mention linux package releases in the readme 2019-05-26 11:18:03 -07:00
Wez Furlong bba1d69c13 remove bincode dep 2019-05-26 09:30:34 -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 3cf20acd13 remove the last of the extern crate lines 2019-05-26 09:00:42 -07:00
Wez Furlong f87901c484 tidy up some failure usage 2019-05-26 08:58:59 -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
Wez Furlong b83656b378 bump image crate dep
This avoids compiling two different versions of image
2019-05-26 08:13:24 -07:00
Wez Furlong a05bca460e fixup unused doc comment warning 2019-05-26 07:59:39 -07:00
Wez Furlong d518c9b2c9 bump filedescriptor crate version to pickup pipe inheritance on windows 2019-05-24 21:26:23 -07:00
Wez Furlong 2e44af7702 filedescriptor: pipes should not be inheritable on windows 2019-05-24 21:26:23 -07:00
Wez Furlong 3bf551706e improve pty example
Example output on linux:

```
child status: ExitStatus { successful: true }
output: wez\r\n%
```

Example output on windows:

```
child status: ExitStatus { successful: true }
output: \u{1b}[2J\u{1b}[?25l\u{1b}[m\u{1b}[HDOMAIN\\wez\u{8}\u{1b}]0;C:\\windows\\system32\\whoami.EXE\u{0}\u{7}\u{1b}[?25h
```

Refs: https://github.com/wez/wezterm/issues/27
2019-05-21 08:58:42 -07:00
Wez Furlong 015a97e2be add pty example that runs whoami
Refs: https://github.com/wez/wezterm/issues/27
2019-05-20 07:20:47 -07:00
Wez Furlong 257c864403 flesh out the crate level docs 2019-05-19 22:35:35 -07:00
Wez Furlong 1d8b024f2f add some doc comments to the pty crate
Refs: https://github.com/wez/wezterm/issues/27
2019-05-19 20:31:07 -07:00
Wez Furlong c562f35db8 adopt my filedescriptor crate in the pty crate
Refs: https://github.com/wez/wezterm/issues/27
2019-05-19 19:54:12 -07:00
Wez Furlong 7464965d1e fixup windows build for pty mod -> crate move
Refs: https://github.com/wez/wezterm/issues/27
2019-05-19 18:55:10 -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 a9fd318095 prep for publishing filedescriptor to crates.io 2019-05-19 14:27:11 -07:00
Wez Furlong 0d07c1e6b9 F_DUPFD_CLOEXEC is posix, so just assume we have it on unix 2019-05-19 11:57:44 -07:00
Wez Furlong 135a191b57 fix F_DUPFD_CLOEXEC usage 2019-05-19 11:54:05 -07:00
Wez Furlong ca15d6da1a explicit comment about not inheriting in DuplicateHandle 2019-05-19 10:53:51 -07:00
Wez Furlong b4056f6c96 potentially support atomic dup on linux
I'm testing this under WSL which doesn't seem to support it,
so I'm committing this so I can try it on a real linux system.
2019-05-19 10:49:09 -07:00
Wez Furlong 32389ee980 use pipe2() for atomic cloexec on linux 2019-05-19 10:09:11 -07:00
Wez Furlong c0f4e4907d Tidy up the Pipe interface 2019-05-19 09:39:34 -07:00
Wez Furlong ee9b5c7a68 add docs for as_stdio 2019-05-19 09:14:40 -07:00
Wez Furlong 143617155e filedescriptor: add some doc comments 2019-05-19 09:04:47 -07:00
Wez Furlong 0f83309b58 centralize/share some filedescriptor bits 2019-05-19 08:40:38 -07:00
Wez Furlong ed4a605355 rename FileDescript::fd -> handle on unix 2019-05-19 08:21:35 -07:00
Wez Furlong 9a9fdd5e96 add OwnedHandle concept to the unix flavor of filedescriptor
Not strictly needed, but improvess symmetry with the windows flavor.
2019-05-19 08:15:35 -07:00
Wez Furlong a444047e22 tidy up FileDescriptor safety and interface 2019-05-19 07:51:43 -07:00
Wez Furlong abdb48469f tidy up raw handle conversions for filedescriptor 2019-05-19 07:10:31 -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
Wez Furlong c40af4312a basically functioning on windows
(missing some basic builtins like echo though!)
2019-05-18 17:42:01 -07:00
Wez Furlong 9271c130c5 make filedescriptor crate compile on windows 2019-05-18 10:30:28 -07:00