Age | Commit message (Collapse) | Author |
|
Better bounds checking.
|
|
- Rename wrap to input_needs_wrap and providing documentation.
- Standardize on min.
- Optimization on subtracting col.
|
|
Most of the crashes on resize were due to columns and lines being set to
zero. This causes all sorts of other checks within the code to ensure
these values are greater than zero before running calculations. To avoid
this we just need to ensure that lines and columns are some non zero
value. This is seems to be what gnome terminal does. I have selected
2 lines and two columns for min terminal size for now.
|
|
|
|
This implementation of line wrapping ensures self.cursor.col is never out
of bounds, thus not requiring checking.
|
|
- Remove the use of limit.
- Reduce the number of comparisons.
When using numbers provided by the PTY for subtractions there is a extra
step of ensuring that we won't trigger failure on testing when trying to
subtract form zero.
** NOTE **
This commit fails fails the tmux_git_log test. I am submitting a PR to
talk about the test. I think the test was generated before a few things
were fixed the final test gird still has cells that should have been
scrolled off the screen. Also, comparing output from gnome-terminal
there is no difference. So this PR is here to discuss and gather
information on balding test and discussing the possibility that this test
may be flawed.
** NOTE **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
According to:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
|
|
Also adds a benchmark for cell.reset().
|
|
Just a bit of cleanup.
|
|
There was a lot of complexity around the threadsafe `Flag` type and
waking up the event loop. The idea was to prevent unnecessary calls to
the glutin window's wakeup_event_loop() method which can be expensive.
This complexity made it difficult to get synchronization between the pty
reader and the render thread correct. Now, the `dirty` flag on the
terminal is also used to prevent spurious wakeups. It is only changed
when the mutex is held, so race conditions associated with that flag
shouldn't happen.
|
|
Moving the window on macOS would cause a panic in certain circumstances.
|
|
|
|
Long lines were previously broken at the terminal width. Now, a wrapping
marker is kept on the final cell so that extra newlines are not
inserted.
|
|
Still need automatic loading into selection copy buffer for linux.
|
|
This adds the ability to click and drag with the mouse and have the
effect of visually selecting text. The ability to copy the selection
into a clipboard buffer is not yet implemented.
|
|
|
|
All of the changes in this commit are due to clippy lints.
|
|
Resolves #25
|
|
This adds a trait OnResize and a separate method handle_resize to the
display. Instead of having a callback to receive resize events, a list
of &mut OnResize are passed to this new method. Doing this allowed the
only RefCell usage in the codebase to be removed :).
|
|
The cell under the cursor is now tracked in the input processor at
`self.mouse.line` and `self.mouse.column`. This could probably be
optimized to only compute the cell when in certain states, but the
calculation is cheap.
|
|
This is part of an ongoing decoupling effort across the codebase and
tidying effort in main.rs. Everything to do with showing the window with
a grid of characters is now managed by the `Display` type. It owns the
window, the font rasterizer, and the renderer. The only info needed from
it are dimensions of characters and the window itself for sizing the
terminal properly. Additionally, the I/O loop has access to wake it up
when new data arrives.
|
|
The identify_terminal function signature had to change to support
writing to the terminal before processing additional input.
|
|
ANSI escape sequences like `\x1b[48;5;10m` were not supported until now.
Specifically, the second attribute, 5, says that the following attribute
is a color index.
The ref tests were updated since `enum Color` variants changed.
|
|
Binding/Action execute now has access to TermMode to support bracketed
paste mode.
|
|
The cell module was previously implemented within term.rs. Now each
module has its own file.
|