aboutsummaryrefslogtreecommitdiff
path: root/src/term
Commit message (Collapse)AuthorAge
...
* Add clippy check to travisChristian Duerr2018-01-06
| | | | This commit adds clippy as a required step of the build process. To make this possible, all existing clippy issues have been resolved.
* Improve ability of alacritty to deal with broken configChristian Duerr2018-01-06
| | | | | | | | | | | | | Until now alacritty completely refuses to start when the config is broken in any way. This behavior has been changed so the worst-case is always that alacritty launches with the default configuration. When part of the config is broken, alacritty shouldn't instantly try to recover to the default config, but instead try to use defaults only for the parts of the config which are broken. This has also been implemented for most of the fields in the configuration. So it should be possible that parts are broken, but the rest is still used for the configuration. This fixes #954.
* Prevent font_size_modifier from sinking too low (#994)Christian Duerr2018-01-05
| | | | | | | | | This replaces the `font_size_modifier` stored on the `Term` struct with a `font_size` field. With this change it is not necessary anymore to calculate the new font size from a delta but the current font size is always stored directly on the `Term` struct. As a result of this it is now possible to increase the font size by more than 127 steps at runtime. It also limits the minimum font size to 1, so issues with the `font_size_modifier` dropping far below font size 1 are resolved with this change. This fixes #955.
* Add support for set-clipboard. (#970)Geert Jansen2018-01-02
| | | This allows e.g. tmux to set the clipboard via the OSC 52 escape code.
* Refactor populate cursor, fix-wide-cursor (#762)Oliver Uvman2017-12-24
| | | Cleanup cursor handling code and support wide cursors
* Change mouse cursor on terminal mode change (#865)Dustin2017-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some terminals have functionality around changing the type of mouse cursor dynamically (arrow and text) based on which mode(s) the VTE is in. For example, gnome-terminal changes the cursor from text (default) to an arrow when opening programs that track mouse events (e.g. vim, emacs, tmux, htop, etc.). The programs all allow using the mouse interactively under some circumstances (like executing `set mouse=a` in vim). The programs that use an interactive mouse set the terminal mode to different values. Though they're not entirely the same terminal mode across programs, an emulator like vte (the library gnome-terminal implements), changes the mouse cursor if the mouse mode is one of the following: - 1000: Mouse Click Tracking - 1001: Mouse Highlight Tracking - 1002: Mouse Cell Motion Tracking - 1003: Mouse All Motion Tracking - 1004: Mouse Focus Tracking See https://github.com/GNOME/vte/blob/6acfa59dfcceef65c1f7e3570db37ab245f049c4/src/vteseq.cc#L708 for more information. This commit adds functionality that changes the winit/glutin `MouseCursor` when a mouse-listening mode of 1000-1004 is set. It behaves similarly to when the window title changes.
* Adding dynamic_title property to configuration (#819)Wesley Gahr2017-12-24
| | | | | This logic is applied in Term's ansi::Handler implementation to avoid unnecessary allocations.
* Add box cursor to unfocused underline and beamChristian Duerr2017-12-24
| | | | | | | Because some people have requested this change, the beam and underline cursors now also transform into an empty box when the terminal loses focus. Like this there is one unique symbol to indicate that a terminal is not currently focused.
* Add custom box cursor for unfocused windowChristian Duerr2017-12-24
|
* Add custom beam cursorChristian Duerr2017-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | In issue jwilm/asacritty#31 a few people complained about Beam cursor being weird with their fonts, so to make all cursors uniform in alacritty, a custom cursor has been added for the Beam too. The beam cursor's height is always the full height of the monospace font glyph bounding box. The width depends on the font size. It is calculated using the width of the cell and dividing it by two. The block is always aligned at the far-left of the cell. The implementation is identical to the one of the underline cursor, but it has been refactored so the glyphs are created in `lib.rs`, which can be used by darwin/macos to implement these features too. A small bug in the underline cursor has also been fixed, until now the width was just using the width of the unicode character. Now it should be using the full width of the monospace glyph bounding box with every font. Here are some screenshots for the Beam cursor: ![Small](https://u.teknik.io/v1QH3.png) ![Normal](https://u.teknik.io/RTlp2.png) ![Big](https://u.teknik.io/DLu2M.png) ![Huge](https://u.teknik.io/pSAFX.png)
* Update comment to reference proper characterChristian Duerr2017-12-24
| | | | | | The unicode character comment has been updated to correctly reference the character instead of commenting on the variable that might be that character.
* Revert to old system for macosChristian Duerr2017-12-24
| | | | | | Because rendering with macos works differently, the old underline cursor is used for that. The cursor symbol has also been setup as a constant in the font project.
* Add custom underline cursorChristian Duerr2017-12-24
| | | | | | | | | | | | | | | As mentioned in jwilm/alacritty#931, it can be troublesome if a font has an underline symbol outside of the glyph's bounding box. This can lead to the underline disappearing at the bottom of the terminal. As a solution a symbol from the private use area was used as the character code for the underline symbol. Whenever this symbol is encountered, instead of rendering it, a custom block is rendered. In this implementation the block has the full character as width and sits flush with the bottom of the glyph's bounding box. The height is half the distance between the baseline and the bottom of the bounding box.
* Update bitflags to v1Chet Gurevitch2017-12-23
|
* Assure that newlines are in selections (#777)Dustin2017-12-22
| | | | | | | | | | | When a selection was made, the last line of the selection did not include a new line character when the line ending was selected. This would occur if only one line was selected; if multiple lines were selected, only the final line did not include a newline. This commit updates the `string_from_selection` function to attempt to append a newline character in all places where they are suitable. Because of the simplification of newline insertion, several trait implementations were removed.
* Style nitsJoe Wilm2017-12-22
|
* Implement faux scrollingChristian Duerr2017-12-22
| | | | | | | | This patch implements faux scrolling inside the alternate screen buffer. Whenever the user scrolls up or down while the alternate screen buffer is active, instead of actual scrolling three up/down arrow keys are inserted.
* Add cursor style option (#928)Christian Duerr2017-12-03
| | | | | | | | The default cursor can now be configured through the cursor_style field of the config. Valid options include Block, Underline, and Beam. The default can be restored by sending \e[0q as in VTE terminals. Live config reloading is supported for this parameter.
* clippy: do and don't pass some things by reference as suggested ↵Matthias Krüger2017-12-03
| | | | (needless_pass_by_value, needless_borrow).
* Match LF behavior outside scroll region with urxvtJoe Wilm2017-11-11
| | | | | Outside of a scroll region, linefeed will still advances the line until reaching the bottom row in other terminals. Alacritty now matches that.
* Correct linefeed handling when scroll region set (#855)Yan2017-11-11
| | | | | | | | | | | Linefeeds should only move the cursor down if it's before the end of the scroll region. The "out of bounds" panic was triggered by linefeeds going off the bottom of the screen when the scroll region end was above the cursor. Note: https://vt100.net/docs/vt102-ug/chapter5.html "Characters added outside the scrolling region do not cause the screen to scroll."
* fix some typos in commentsMartin Lindhe2017-10-30
|
* Set urgent WM flag on bell on X11 systems (#812)Barret Rennie2017-10-21
| | | | | Sets the urgent WM flag when bell is emitted on X11 systems. Additionally, the flag is cleared on focus because not all WMs clear it automatically.
* Fix solid background color opacity (#847)Joe Wilm2017-10-21
| | | | | | | | | | | | | | | Since landing the patch adding transparency support to Alacritty, there's been an issue where othewise solid background cells were also being rendered partially transparent. Now, all filled background cells are rendered fully opaque. Some logic was added to support discarding filled backgrounds which had the same color as the default background. This means that, if the default background is #000 and a cell has that background, it will never be rendered opaque. This may not be correct. Note that many truecolor vim color schemes print spaces for default colored background cells. Performance can be dramatically improved by using ctermbg=NONE guibg=NONE to skip rendering those cells.
* Implement user actions for font resize (#625)Dan Aloni2017-10-14
| | | | | | | | | | | | | | | | | Adds support for font resizing at run-time. Three new actions are introduced: * IncreaseFontSize - Increases current font size by 1.0 * DecreaseFontSize - Decreases current font size by 1.0 * ResetFontSize - Resets font size to that specified in the configuration. The stock config files have example configuration for each which should match gnome-terminal. For convenience, the config entries are: - { key: Key0, mods: Control, action: ResetFontSize } - { key: Equals, mods: Control, action: IncreaseFontSize } - { key: Subtract, mods: Control, action: DecreaseFontSize }
* Fix resize behaviorJoe Wilm2017-10-14
| | | | | Should prevent the messed up background colors that appear in some situations (especially on tiling WMs).
* Use clippy = "*", update, and fix some warnings (#796)Aaron Hill2017-09-27
| | | | | Because there are so many clippy warnings in the current codebase, this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]', to make it easier to fix warnings incrementally.
* Update most remaining depsJonathan Schleußer2017-09-05
|
* Fix reloading colors from config (#756)Tuomas Siipola2017-08-29
|
* Fix newline + scroll region bug (#747)Joe Wilm2017-08-22
| | | | | | | | | | When a scroll region is active with the cursor below the bottom of the region, newlines should not cause the region to scroll. A ref test was added for this situation to prevent regressions. Thanks @hiciu for reporting and @nicm for the test case. Resolves #745.
* Fix smcup/rmcup toggle bugJoe Wilm2017-08-11
| | | | Resolves #634.
* Rename some variables for clarityJoe Wilm2017-08-11
|
* Fix BCE issues affecting vimJoe Wilm2017-08-11
| | | | | | | | Now pass more vttests as well. Resolves #123 cc #660 - screenshot there exhibited the problem, but issue is not entirely about the background problem.
* Support background and foreground color escape codes (#662)Tuomas Siipola2017-07-28
|
* add support for X input method (#691)Ted Yin2017-07-24
|
* Implement and use ansi attribute CancelBold (#659)ftilde2017-07-20
|
* Add dim color supportJake Merdich2017-06-23
| | | | | | | | | | | Add support for the VTE 'dim' flag, with additional support for custom-themed dim colors. If no color is specified in the config, it will default to 2/3 the previous (not a spec, but the value other terminals seem to use). The actual dimming behavior brings bright colors to normal and regular colors to the new dim ones. Custom RGB values are not changed, nor are non-named indexed colors.
* Update tests for new Selection APIJoe Wilm2017-06-19
|
* Fix unnecessary redraws with active selectionJoe Wilm2017-06-19
| | | | | | | Could be cleaned up a bit if there was a wrapper for Option<Selection> that contained this flag. Also fixes a few compiler warnings.
* Implement semantic and line selection draggingJoe Wilm2017-06-19
| | | | | | Unlike the regular selection that is by cell, these selection modes highlight either semantic groupings or entire lines while the mouse is dragged.
* Fix bright inverse colors (#621)DarkDefender2017-06-18
| | | Fixes #611.
* Implement 'backwards tab'Aaron Hill2017-06-18
| | | | | This escape sequence isn't officially documented anywhere, but is supported by xterm and gnome-vte.
* Use cursor cell template when handling 'CSI X' escape sequenceAaron Hill2017-06-14
| | | | | | | This ensures that the cleared cells are set to the proper background color, which is the main usage of this escape sequence. Fixes #612
* Add support for Beam, Underline cursorsJoe Wilm2017-06-11
| | | | | | | | | | | | | | | Notable about this implementation is it takes a different approach for managing cursor cells that previously. The terminal Grid is now borrowed *immutably*. Instead of mutating Cells in the Grid, a list is managed within the RenderableCellsIter. The cell at the cursor location is skipped over, and instead cells are popped off a list of cursor cells. It would be good in the future to share some more code between the different cursor style implementations for populating the cursor cells list. Supercedes #349.
* Implement FocusIn/FocusOut reports (#589)Aaron Hill2017-05-29
| | | | Implements sending FocusIn/FocusOut events, as defined at http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-FocusIn_FocusOut
* Use debug! instead of println!Dominik Miedziński2017-05-12
|
* Fix Device Status reportsDominik Miedziński2017-05-08
|
* Add support for Query Device StatusDominik Miedziński2017-05-07
|
* Fix bug in SizeInfo::contains_pointJoe Wilm2017-05-06
| | | | Accidentally broke it when refactoring.
* Add window padding optionTuomas Siipola2017-05-06
| | | | | | | | | | | Padding can be configured by using the `padding` field in the config file, like so: padding: x: 2 y: 2 which would result in a 2px padding within each side of the window.