Commit Graph
1325 Commits
Author SHA1 Message Date
Wez Furlong 7b855fbd05 wezterm: fixup tests 2020-09-23 21:20:48 -07:00
Wez Furlong 74b10996dc wezterm: simplify AdjustPaneSize
refs: https://github.com/wez/wezterm/issues/157
2020-09-23 21:10:26 -07:00
Wez Furlong 84753a8261 wezterm: add ActivatePaneDirection key assignment
This allows moving to an adjacent pane in the specified direction.

refs: https://github.com/wez/wezterm/issues/157
2020-09-23 21:01:40 -07:00
Wez Furlong 97ff359a18 wezterm: add AdjustPaneSize keyassignment
This allows resizing a pane directionally.
2020-09-23 20:26:25 -07:00
Wez Furlong 86cc214344 wezterm: allow dragging pane edges to resize them
refs: https://github.com/wez/wezterm/issues/157
2020-09-23 18:01:48 -07:00
Wez Furlong f9c9510691 wezterm: improve split positioning
The math for computing the position for nested splits was a bit off.
2020-09-23 09:19:23 -07:00
Wez Furlong c2100d96c3 wezterm: Implement basic splits in the UI.
This commit provides the heart of the split functionality.
It adds a couple of key assignments (that are not finalized)
for splitting the active pane horizontally or vertically.

Clicking in a pane will activate it.
Selection is constrained to the active pane.
Resizing a window will grow/shrink the right/bottom side of a split.
The scrollbar applies to the active split.

There's not yet a way to resize a split at all.
There's not yet a key assignment for changing the active split.

The software renderer doesn't know how to render the splits correctly.

refs: https://github.com/wez/wezterm/issues/157
2020-09-22 22:12:11 -07:00
Wez Furlong ec468acb40 panes: adopt zipper based bintree for managing panes
This simplifies the logic in the tab.rs module
2020-09-20 10:20:40 -07:00
Wez Furlong 3d54a542bf wezterm: add PaneNode tree to Tab
This expands the data model for Tab so that it can record a binary
tree of panes; this allows for conceptually splitting a Pane either
horizontally or vertically.

None of the other layers know about this concept yet.

refs: https://github.com/wez/wezterm/issues/157
2020-09-20 08:27:44 -07:00
Wez Furlong a6316315bb wezterm: introduce concept of Pane to the Mux model
This adds an extra level of indirection to the Mux model;
previously we allowed for Windows to contain an ordered
collection of Tabs, where each Tab represented some kind
of pty.

This change effectively renames the existing Tab trait to Pane
and introduces a new Tab container, so the new model is that
a Window contains an ordered collection of Tabs, and each Tab
can have a single optional Pane.

refs: https://github.com/wez/wezterm/issues/157
2020-09-20 08:27:32 -07:00
Wez Furlong 3484478ba2 wezterm: speculative workaround for RDP disconnect panic
Attempt to recover in the case where we cannot re-allocate
our vertex buffers; try to restore the prior dimensions
and resize the OS window to match.

refs: https://github.com/wez/wezterm/issues/265
2020-09-12 22:33:35 -07:00
Wez Furlong 94fb5094a4 wezterm: compile in default color schemes
Rather than scanning directories and reading in ~230 files on startup,
do the scan at build time so that we're parsing from memory rather
than local storage.

This should shave a bit of time off the startup, although I
haven't measured this, and I've only run this on a remote
linux system thus far.

refs: https://github.com/wez/wezterm/issues/264
2020-09-10 21:46:45 -07:00
Wez Furlong 3090c9bb68 fix build for windows 2020-09-10 15:00:43 -07:00
Wez Furlong aae287c4f2 fix filedescriptor::poll on macos
Need to use the subsecond microsecond value, rather than the total
microsecond value, otherwise `select(2)` will yield EINVAL.

The wezterm changes show where this error was bubbling up
and breaking the tls client code.
2020-09-10 13:58:14 -07:00
Wez Furlong 99b8fb2612 wezterm: add tab_max_width config option
This allows setting the maximum width of a tab in the tab tab.
It defaults to 16 glyphs in width.

refs: https://github.com/wez/wezterm/issues/255
2020-08-29 10:45:01 -07:00
Wez Furlong 5457c09590 wezterm: enable_wayland = false by default
refs: https://github.com/wez/wezterm/issues/224
2020-08-16 09:50:00 -07:00
Wez Furlong 1209cde2b1 Add bold_brightens_ansi_colors configuration option
refs: https://github.com/wez/wezterm/issues/244
2020-07-18 09:02:56 -07:00
Wez Furlong 8266d40944 maybe fixup build 2020-07-13 23:13:38 -07:00
Wez Furlong 888cded0e3 x11: remove Rc cycle between XConnection, Window, bitmaps
refs: https://github.com/wez/wezterm/issues/238

It's not a smoking gun, but helps clean up the valgrind output
2020-07-13 09:00:00 -07:00
Wez Furlong 5b654710cb wezterm: fix already mutably borrowed: BorrowError when switching tabs
Not sure why this didn't bubble up earlier, but the issue was introduced
by https://github.com/wez/wezterm/commit/4e6357b21829d8549ebbb0750d8f7faad9fffc70

And it was not setting focus=true on the new tab either :-/

refs: https://github.com/wez/wezterm/issues/232
2020-06-22 17:08:29 -07:00
Wez Furlong 2b2555c62a wezterm: avoid extraneous work in search overlay
viewport changes could do a little bit more than they needed
to when the search overlay was active.  Guard against that by
checking to see if the viewport is already set to the new position.
2020-06-21 22:44:11 -07:00
Wez Furlong 076cf3d177 wezterm: teach renderer about overline
This commit adds an overline glyph which is simply a line drawn at
the top of the cell.

Due to the way that we use a single glyph for the line layer, this
actually adds a handful of combination glyphs for the different
underline, overline and strikethrough possibilities.

It's getting a bit hefty.  Adding another similar attribute in
the future (eg: maybe wiggly underlines?) might prove to be too
much for the simple approach we have right now.

```bash
printf "\x1b[53moverline\x1b[0m\n"
```
2020-06-20 23:18:52 -07:00
Wez Furlong 4e6357b218 term: enable DECSET 1004 Focus Reporting
This is enabled only for local terminals for now; the multiplexer
protocol will need to be extended to carry this signal.
2020-06-20 22:01:56 -07:00
Wez Furlong 843ce152ec wezterm: ActivateTab now accepts negative numbers
This allows setting up shortcuts relative to the final tab in
a window, rather than always being relative to the first.

The default assignment for CTRL+SHIFT+9 is now `ActivateTab=-1`
as a convenient way to always reach the last tab.

refs: https://github.com/wez/wezterm/issues/228
2020-06-20 12:45:09 -07:00
Luben Karavelov 5a76302c84 Update to allsorts-0.4 2020-06-20 12:31:11 -07:00
Wez Furlong 8f1f1a65ea window: handle opengl context loss on windows.
With this commit, we now survive a reinstall or upgrade of the nvidia
drivers on my Windows sytem without crashing.

This commit allows notifying the application of the context loss
so the application can either try to reinit opengl or open a new
window as a replacement and init opengl there.

I've not had success at reinitializing opengl after a driver upgrade;
it seems to be persistently stuck in a state where it fails to allocate
a vertex buffer.

SO, the state we have now is that we try to reinit opengl on a new
window, and if that fails, leave it set to the software renderer.

This isn't a perfect UX, but it is better than terminating!

refs: https://github.com/wez/wezterm/issues/156
2020-06-16 21:17:48 -07:00
Wez Furlong d9f84da6ec fonts: fix second parameter of wezterm.font
The following configuration now works as intended:

```lua
local wezterm = require 'wezterm';
return {
  -- font = wezterm.font('JetBrains Mono'),
  font_rules = {
    {
      italic = false,
      intensity = "Normal",
      font = wezterm.font("JetBrains Mono"),
    },
    {
      italic = true,
      font = wezterm.font("JetBrains Mono", {italic=true}),
    },
    {
      intensity = "Bold",
      font = wezterm.font("JetBrains Mono", {bold=true}),
    },
    {
      italic = true,
      intensity = "Bold",
      font = wezterm.font("JetBrains Mono", {bold=true, italic=true}),
    }
  },
}
```
2020-06-16 08:27:35 -07:00
Wez Furlong 500e404db4 window: move opengl post-init to a callback on the trait
This allows potentially automatically re-initializing the
state if the context is lost.
2020-06-14 21:47:40 -07:00
Wez Furlong a5270c767f wezterm: make sure we don't lose alt on !macos 2020-06-13 23:06:08 -07:00
Wez Furlong 2803e8fc58 wezterm: improve left vs right alt behavior on macos
This commit allows distinguishing between left and right alt
modifiers at the window layer.  So far only macos provides
this additional information.

Expand the logic that decides whether Alt should emit the
composed key or act as the raw key with the Alt modifier flag
set so that we can set that behavior separately for the left
and right modifiers on systems that support it, and use the
existing config for systems that don't support it.

The default settings for these flags is that Left Alt will
send the uncomposed key + Alt modifier while the Right Alt
will behave more like AltGr (which is typically on the RHS
of the keyboard) and send the composed key.

This gives more flexibility by default and hopefully matches
expectations a bit better.

refs: https://github.com/wez/wezterm/issues/216
2020-06-13 22:45:13 -07:00
Wez Furlong 8250f9e4cf wezterm: set a reasonable default LANG on macos
If LANG isn't set then ask NSLocale for the language and country code
and see if we can conjure up a valid UTF-8 locale name.  If so,
export that in the LANG environment for our children to inherit.

refs: https://github.com/wez/wezterm/issues/220
refs: https://github.com/wez/wezterm/issues/216
2020-06-13 20:41:52 -07:00
Wez Furlong 6959717e37 wezterm: use_ime now defaults to false
The weird key repeat behavior and other occasional warts
mean that this should probably be disabled by default.

refs: https://github.com/wez/wezterm/issues/215
2020-06-13 15:02:42 -07:00
Wez Furlong aa1bc7bc06 wezterm: fix cursor artifacts in neovim when using blinking cursor
Problem reported here:
https://github.com/wez/wezterm/commit/47dc81c8d949336fd25c13faab0965759b3122f6#commitcomment-39881097
2020-06-13 10:32:26 -07:00
Wez Furlong d547d938d8 term: rename crate to wezterm-term in advance of publishing
Add some more docs and remove a couple of dead bits of code.
2020-06-13 09:55:16 -07:00
Wez Furlong 47dc81c8d9 termwiz: separate CursorVisibility from CursorShape
They are separate concepts and this simplifies some processing.

closes: https://github.com/wez/wezterm/pull/212
2020-06-12 19:44:54 -07:00
Wez Furlong 11f599b057 wezterm: invalidate the window after handling a key press
refs: https://github.com/wez/wezterm/issues/219
2020-06-12 18:20:30 -07:00
Wez Furlong 9f1303fb8e term: fixup ctrl+ ambiguous ctrl code representation
This was originally intended to be swept in and dealt with as part of
adopting CSI-u (refs: https://github.com/wez/wezterm/issues/63) but the
default shift-space mapping is super irritating in vim (refs:
https://github.com/wez/wezterm/issues/126) so it got partially walked
back, but as a consequence we accidentally dropped the modifiers from
those keys (refs: https://github.com/wez/wezterm/issues/213 refs:
https://github.com/wez/wezterm/issues/214).

This commit restores the modifiers for that case.

In addition, since we now have a way to plumb configuration directly
into the term crate, this adds a config option to enable CSI-u for those
that want to use it.
2020-06-10 17:07:30 -07:00
Wez Furlong 5d5083501e wezterm: dont stack search/copy overlays on top of each other
I noticed that repeatedly triggering copy mode kept adding the
`Copy Mode` prefix to the title!
2020-06-06 17:11:56 -07:00
Wez Furlong 344543260e wezterm: allow connui size to be specified, make update ui taller
The release notes are generally slightly taller than the default
window size.
2020-06-06 16:54:02 -07:00
Wez Furlong bec7e36a09 wezterm: updates: link directly to setup.exe on windows
and revise the installation page links to match the currently
running OS.
2020-06-06 16:47:02 -07:00
Wez Furlong 53ad753b28 wezterm: helper env for testing the update ui 2020-06-06 16:22:28 -07:00
Wez Furlong 5caafc45e0 wezterm: hide connui immediately on connection success 2020-06-06 14:32:34 -07:00
Wez Furlong c6b27131e4 wezterm: avoid busy loop if connui is closed early
I noticed a busy period when closing the connui when it is performing
the sleep with progress bar stage; returning from the function when
the channel disconnects seems like the right call.

I also made the loop slightly more efficient by only repainting if
the line has changed.
2020-06-06 14:18:39 -07:00
Wez Furlong afe72f3bc5 wezterm: fix occasional hang when initiating a mux connection
I don't really like this as a solution, however: I'd rather
spend time transitioning towards async IO for this instead of
troubleshooting further here.
2020-06-06 11:44:22 -07:00
Wez Furlong adb0ae6576 wezterm: remove workaround for ssh crate
All of the types in that crate are now Send so we don't have
to force that here.
2020-06-06 10:05:25 -07:00
Wez Furlong bd57029427 wezterm: allow specifying the remote wezterm path for mux clients
both tls and ssh domains now have a `remote_wezterm_path` config
option.
2020-06-06 10:01:39 -07:00
Wez Furlong 2e7f082bd7 wezterm: improve error reporting around mux connection failures 2020-06-06 09:46:25 -07:00
Wez Furlong d660f53f86 wezterm: render release notes as markdown in the update UI
This adds a markdown -> termwiz render helper for the update UI
to make the release notes look a bit more intelligible.
2020-06-06 06:33:54 -07:00
Wez Furlong cb6944f5eb wezterm: add buffer to termwiztermtab
I noticed that the launch menu was a bit flickery when moving
the mouse around, and I think a buffer will help.
2020-06-05 18:03:19 -07:00
Wez Furlong 62cd4665d2 wezterm: search mode: add PageUp + PageDown
These move one page at a time, which is useful when there are a lot
of matches in a given page.

refs: https://github.com/wez/wezterm/issues/91
2020-06-05 08:50:38 -07:00