aboutsummaryrefslogtreecommitdiff
path: root/src/term
AgeCommit message (Collapse)Author
2017-05-01Support insert modeJoe Wilm
2017-05-01Add limit check in scroll_up/down_relativeJoe Wilm
2017-05-01Implement tab stop manipulationJoe Wilm
Adds implementations for TBC (tabulation clear) and HTS (set horizontal tabstop).
2017-04-20Remove unused limit functionJoe Wilm
2017-04-20Fix some bugs with resizeJoe Wilm
2017-04-19Fix issue with back_color_eraseJoe Wilm
back_color_erase should not set flags like bold, underline, etc.
2017-04-19Pass scrolling region tests in vttest 2Joe Wilm
2017-04-19Partially add DECCOLM supportJoe Wilm
It's not possible with DECCOLM to temporarily set 80 or 132 column mode since the function is a toggle between the two. Instead, only the additional affects are run in order to get closer to passing vttest. vttest will never be perfect due to the column mode issue.
2017-04-18Support DECOM (Origin Mode)Joe Wilm
2017-04-18Fixes for vttest cursor movement screen 1Joe Wilm
2017-04-18Implement LF/NLJoe Wilm
2017-04-04fix tabulation renderingRoman Shmatov
2017-04-03Fix issue with htop rendering incorrectlyJoe Wilm
Since we're emulating xterm, we need to support back_color_erase. If this is found to cause any issues, please open a ticket on GitHub. Resolves #85.
2017-03-04Handle CSI command J3 (Clear saved lines)Aaron Hill
Xterm supports an extension to the CSI command `Erase in Display (ED)`, under the command number 3. This command is used to clear the scrollback buffer - e.g. anything not visible on the screen. Since scrollback is not part of alacritty, the handler for this command currently does nothing. If at some point scrollback is implemented, the corresponding `match` arm can be modified to properly handle this. For an example of a program which uses this command, run the `clear` command (using ncurses 6.0). In a supported terminal such as `gnome-terminal`, this will clear anything off of the screen from the scrollback buffer. Before this change, `alacritty` would generate an `Unhandled CSI` message.
2017-03-02Add support for wide charactersJoe Wilm
2017-02-27Update cell to cursor template when adding a tab.Anders Rasmussen
2017-02-25Change cursor colors config to use text and cursorJoe Wilm
This changes the cursor color config to use the `text` and `cursor` properties instead of the current `foreground` and `background` properties. The latter names stop making sense when dealing with cursors like a vertical bar or underscore. In the new system, the block, underscore, or vertical bar would always take the color of `cursor`, and the text would take the color of `text` when using a block, or keep its normal color when using the underscore or vertical bar. A warning is now emitted on startup when the old form of cursor color config is used. This will be a hard error in the future.
2017-02-22Lazily reset `start_time` in VisualBell's `completed` methodMark Andrus Roberts
Fixes #416. Here's what I think is happening: at short `duration`s, the VisualBell's [`completed` check](https://github.com/jwilm/alacritty/blob/3ce6e1e4b2924b0d432cbb3e62b4bbef88dd38ff/src/term/mod.rs#L377) is returning `true` before we've actually had a chance to draw the "normal" background color. I thought about driving this condition off of whether or not `intensity` returns 0.0, but we may still miss a draw, I think. Perhaps the best way to tackle this is to let `completed` lazily reset the VisualBell's `start_time` (something @jwilm asked about when this feature originally landed), and to only return `true` when the VisualBell's `start_time` is `None`. This should effectively delay the final draw until after the VisualBell completes.
2017-02-17use an empty cell as template when resizing gridsAnders Rasmussen
2017-02-11Handle OSC for setting indexed color valuesJoe Wilm
Resolves #26.
2017-02-11Move color list to Term structJoe Wilm
The color list needs to be updated by the parser, and this isn't possible if it's on the config. This change makes sense semantically as well since it's really part of the terminal state. This is in preparation for OSC color parsing.
2017-02-11Fix issue with cat /dev/urandomJoe Wilm
2017-02-07Add visual bell supportMark Andrus Roberts
This commit adds support for a visual bell. Although the Handler in src/ansi.rs warns "Hopefully this is never implemented", I wanted to give it a try. A new config option is added, `visual_bell`, which sets the `duration` and `animation` function of the visual bell. The default `duration` is 150 ms, and the default `animation` is `EaseOutExpo`. To disable the visual bell, set its duration to 0. The visual bell is modeled by VisualBell in src/term/mod.rs. It has a method to ring the bell, `ring`, and another method, `intensity`. Both return the "intensity" of the bell, which ramps down from 1.0 to 0.0 at a rate set by `duration` and `animation`. Whether or not the Processor waits for events is now configurable in order to allow for smooth drawing of the visual bell.
2017-02-07Semantic SelectionXiaoyu Yin
Fix tests and add line select Refactor BidirectionalIter to remove if blocks Allow for cells tagged with WRAPLINE to continue expanding the selection Reorganize config into structs Add test coverage that callbacks are called Cleanup mouse config - Uses Duration type for ClickHandler::threshold - Removes `action` property from ClickHandler--this can be added in a backwards compatible way later on - Renames ClickState::DblClick to DoubleClick fixup! Cleanup mouse config
2017-02-07Implement clearing above cursorJoe Wilm
2017-02-07Fix zsh tab completionJoe Wilm
2017-02-06Render underline on empty cellsTuomas Siipola
This fixes rendering underlines spanning multiple words.
2017-02-03Fix bug with restore cursorJoe Wilm
The saved cursor position could previously end up outside of the grid if the terminal was resized to be smaller and then calling a restore. Restore now ensures the cursor line and column are within grid bounds.
2017-02-03Alacritty now compiles on stable Rust :tada:Joe Wilm
2017-02-02Fix bug introduced with save/restore patchJoe Wilm
Switching between main and alt grids should no longer clear the main grid.
2017-02-02Implement save/restore cursor positionJoe Wilm
This passes the vttest for save and restore cursor position. The implementation was done according to: http://www.vt100.net/docs/vt510-rm/DECSC.html As of yet, there are a few things not supported by the terminal which should otherwise be saved/restored. vte was updated for a fix with CSI param parsing
2017-01-29support for inverting the cursor or using colorsDanny Dulai
2017-01-23Remove debug_print! macrosJoe Wilm
The logging macros should be used instead.
2017-01-23Use the log-crate instead of printing to stdoutLukas Lueg
2017-01-21ansi: Designate and invoke graphic character setsRichard Palethorpe
Implement the designation of graphic character sets G0-G3 to ASCII or the Special character and line drawing glyphs. As well as the invokation/selection of the character sets (shift in, shift out and lock shifting).
2017-01-11Proposal for line wrap - ^[[7h and ^[[7l (private)Michael Brumlow
These changes provide support for disabling auto line wrap which is currently default to on. 'tput rman' will now disable auto line wrap and alacritty will now not automatically wrap lines. 'tput sman' will now (re)enable auto line wrap and alacritty will now automatically wrap lines once it reaches the end of the line. My testing showed this to work the same as gnome-terminal. I should note that simply having ^[[7h or ^[[7l in a recording does not enable and disable line wrapping. This is the same behavior as gnome-terminal and xterm. Those cape codes come through as private which are not handled yet. I behave this is the correct behavior.
2017-01-11Add support for setting title from OSCJoe Wilm
Resolves #23 Resolves #144
2017-01-09Fix last panic with `cat /dev/urandom`Joe Wilm
2017-01-10Fixing panic on cat /dev/urandomMichael Brumlow
- Checks to make sure lines count coming from the pty are within a proper range before doing scrolling. - Sanitizes scroll region when being set. - Changes panic for unimplemented screen clear to a print statement. The first two changes ensure scrolling won't crash us. By sanitizing the region on set we don't have to complicate the scroll code with limits, mins, or maxes to ensure the scroll operation is within the range. Checking if the lines is greater than the total region allows us to simply clear the region and avoid subtracting large numbers from small ones.
2017-01-07Merge pull request #216 from mbrumlow/better_bounds_checkingJoe Wilm
Better bounds checking.
2017-01-07Changes requested.Michael Brumlow
- Rename wrap to input_needs_wrap and providing documentation. - Standardize on min. - Optimization on subtracting col.
2017-01-07Fixing resize crashes.Michael Brumlow
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.
2017-01-07Removing stale comment.Michael Brumlow
2017-01-07Implementing line wrapping.Michael Brumlow
This implementation of line wrapping ensures self.cursor.col is never out of bounds, thus not requiring checking.
2017-01-07Better bounds checking.Michael Brumlow
- 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 **
2017-01-07Fixes a slew of bounds issues.Michael Brumlow
2017-01-06Clippy fixes!Manish Goregaokar
2017-01-06Add `nightly` feature, use for `unlikely` intrinsicManish Goregaokar
2017-01-06Remove need for inclusive rangesManish Goregaokar
2017-01-06Remove need for range_contains featureManish Goregaokar