1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-28 07:55:03 +03:00
Commit Graph

18 Commits

Author SHA1 Message Date
Wez Furlong
1b925b593a fix reported scrollback size for surface based tabs 2020-01-05 14:37:17 -08:00
Wez Furlong
bcf3d8db35 remove some dead code 2020-01-05 14:37:17 -08:00
Wez Furlong
4912e83f3e StableCursorPosition to track the cursor
This fixes up the cursor position when scrolling.

refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
1c716898e7 Remove viewport_offset from RenderableDimensions
refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
6183434bda Track viewport in the gui layer
Use StableRowIndex to implement tracking the viewport in the gui layer.
This resolves an issue where a busy terminal would continue to scroll
through the scrollback when you were paging backwards and look weird.

There's still some cleanup though:

- This breaks the selection ui
- the cursor position is wrong when scrolling back
- shift-pageup/pagedown need to be processed in the gui layer

Refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
5f5113ce50 Renderable: fold get_scrollbar_info into get_dimensions 2020-01-05 14:37:17 -08:00
Wez Furlong
5ba0c70cdb add Tab::is_mouse_grabbed concept
refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
f1846ab0ae add Renderable::get_lines
This allows retrieving arbitrary lines from the scrollback

refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
56c170240f Renderable: replace a 2-tuple with an expanded struct
This cleans up the API a little as part of
refs: https://github.com/wez/wezterm/issues/106
2020-01-05 14:37:17 -08:00
Wez Furlong
f28d9e994f Enable mouse interaction with scroll bar
This commit:

* Removes the ability to drag the window by the tab bar.  I added
  that in anticipation of needing to do custom title bar dragging
  with Wayland, but it turned out both to be not required and not
  possible to drag windows around in that way.
* Replaces the drag logic with dragging the scrollbar thumb
* Clicking above the scrollbar thumb is equivalent to page up
* Clicking below the scrollbar thumb is equivalent to page down
2019-12-22 22:01:00 -08:00
Wez Furlong
ec609a2e41 Add optional scroll position UI
This commit adds a scrollbar that shows the scroll position but
that does not currently allow dragging to scroll.

The scrollbar occupies the right hand side window padding.

The width of the scrollbar can be set by explicitly configuring
`window_padding.right`.  If the right padding is set to 0 (which
is its default value), and the scroll bar is enabled then the cell
width will be used for the right padding value instead.

The scrollbar can be enabled/disabled via this config setting:

```
enable_scroll_bar = true
```

Its color by this:

```
[colors]
scrollbar_thumb = "#444444"
```

(Note that color palette config will be reloaded when the config
file is changed, but you'll need to spawn a new tab/window to
see the effects because we cannot assume that a config reload should
always replace a potentially dynamically adjusted color scheme in
a tab).
2019-12-22 20:12:56 -08:00
Wez Furlong
5abc4e543e rendering now respects cursor visibility
This commit adds some plumbing for describing the cursor shape
(block, line, blinking etc) and visibility, and feeds that through
the mux and render layers.

The renderer now knows to omit the cursor when it is not visible.
2019-12-22 08:52:51 -08:00
Wez Furlong
9a2c7a1485 failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
Wez Furlong
988e996a76 fonts: remove font_system selection type
This simplifies things a bit by removing some boiler plate.
We can now control locator, shaper and rasterizer independently.
2019-12-09 13:35:38 -08:00
Wez Furlong
8996f897b9 remove Mux::config in favor of config::configuration()
The idea is to centralize accessing the config to that
function so that we can implement config reloading.
2019-11-24 09:07:46 -08:00
Wez Furlong
5370e88520 implement explicit Copy keybinding action
previously we would only ever copy to the clipboard when the selection
was changed.

Now we respect the Copy keypress and have it re-copy the selection
into the clipboard.
2019-11-11 08:54:47 -08:00
Wez Furlong
15a86b77bd replace most tinyfiledialogs usage with our own prompts 2019-11-08 21:11:22 -08:00
Wez Furlong
6da7b3ecd0 internalized password/auth UI for ssh
This is a bit of a large commit because it needed some plumbing:

* Change mux creation to allow deferring associating any domains,
  and to change the default domain later in the lifetime of the
  program
* De-bounce the empty mux detection to allow for transient windows
  during early startup
* Implement a bridge between the termwiz client Surface and the
  frontend gui renderer so that we can render from termwiz to
  the gui.
* Adjust the line editor logic so that the highlight_line method
  can change the length of the output.  This enables replacing
  the input text with placeholders so that we can obscure password
  input
2019-11-08 19:55:12 -08:00