aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Add color option to visual bellChristian Duerr2018-12-17
| | | | | | | | | This adds the option to specify the color of the visual bell using the `visual_bell.color` configuration setting. This is done by rendering a big quad over the entire screen, which also opens up options to draw other arbitrary rectangles on the screen in the future.
* Fixing tabs in copy-pasteSteve Blundy2018-12-15
| | | | | | | | | | This resolves issues with copy-pasting tabs by including them in the pasted string. Selection of tabs is still inconsistent with what might be expected based on other terminal emulators, however the behavior hasn't regressed. This fixes https://github.com/jwilm/alacritty/issues/219.
* Ignore result on deregistering ptydm1try2018-12-14
| | | | Fixes #1897.
* Upgrade to Rust 2018Joe Wilm2018-12-10
| | | | | This resolves a lot of NLL issues, however full NLL will be necessary to handle a couple of remaining issues.
* Fix rendering of zero-width charactersChristian Duerr2018-12-09
| | | | | | | | | | | | Instead of rendering zero-width characters as full characters, they are now properly rendered without advancing the cursor. Because of performance limitations, this implementation only supports up to 5 zero-width characters per cell. However, as a result of this limitation there should not be any performance impact. This fixes #1317, fixes #696 and closes #1318.
* Change missing config log level to infoTezkerek2018-12-08
|
* Fix recording of ref testsChristian Duerr2018-12-08
| | | | | | | | | | | Due to the lazy initialization of lines in the Alacritty history, the recording of ref tests was broken. Because a WM would often resize the ref test window after it was spawned, some additional lines were initialized in the stored ref test. To make sure lazy initialization does not play any role in the recording and replaying of reftests, before recording and replaying the tests, the complete grid is initialized and then truncated. This should make sure that only the relevant lines are kept.
* Use tool lints for clippy allow/deny lint attributesMatthias Krüger2018-12-07
|
* Detach Child process to avoid zombie processesVineeth Sagar2018-12-06
| | | | | This makes use of the common double-fork behavior to prevent spawning zombie processes every time a URL is clicked.
* Launch a login shell by default on macOSBjorn Neergaard2018-12-03
|
* Request user attention when bell received in macOSBarret Rennie2018-12-02
| | | | | We now request the user's attention in macOS when a visual bell character is received. This manifests as the window jumping up and down in the dock.
* Fix for an underflow on some type conversions (#1715)Zac Pullar-Strecker2018-11-25
|
* Ignore initial size if the window is maximized on startdm1try2018-11-23
|
* Add option for launching Alacritty maximizedJonathan Dahan2018-11-19
|
* Add keybinding action for clearing warns/errorsChristian Duerr2018-11-19
| | | | | | | | | | | | | Since running `clear` inside of tmux doesn't actually clear any part of the screen, but just resets the scrolling region, the warning and error notices can't be removed without quitting tmux or Alacritty. As a solution, a new action `ClearLogNotice` has been added which has been bound to Ctrl+L by default. As a result, Ctrl+L can be used inside of tmux to remove the messages, even though tmux doesn't clear the screen. This fixes #1811.
* Remove `scale_with_dpi` setting from configChristian Duerr2018-11-18
| | | | | | | | Since the `scale_with_dpi` setting has been deprecated, but it hasn't been removed from the config, Alacritty would print an error every time it is started. To resolve this problem, the option is removed from the default configuration file.
* Lower log level of warnings in ansi.rsChristian Duerr2018-11-18
| | | | | | | | | | Since ansi.rs is mostly about control sequences sent by applications, displaying all issues during parsing to the user can be annoying since Alacritty might not actually do anything wrong. To resolve this problem, all `warn!` logs in `src/ansi.rs` have been decreased to the `debug!` level. This fixes #1809.
* Display errors and warningsChristian Duerr2018-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make sure that all error and information reporting to the user is unified, all instances of `print!`, `eprint!`, `println!` and `eprintln!` have been removed and replaced by logging. When `RUST_LOG` is not specified, the default Alacritty logger now also prints to both the stderr and a log file. The log file is only created when a message is written to it and its name is printed to stdout the first time it is used. Whenever a warning or an error has been written to the log file/stderr, a message is now displayed in Alacritty which points to the log file where the full error is documented. The message is cleared whenever the screen is cleared using either the `clear` command or the `Ctrl+L` key binding. To make sure that log files created by root don't prevent normal users from interacting with them, the Alacritty log file is `/tmp/Alacritty-$PID.log`. Since it's still possible that the log file can't be created, the UI error/warning message now informs the user if the message was only written to stderr. The reason why it couldn't be created is then printed to stderr. To make sure the deletion of the log file at runtime doesn't create any issues, the file is re-created if a write is attempted without the file being present. To help with debugging Alacritty issues, a timestamp and the error level are printed in all log messages. All log messages now follow this format: [YYYY-MM-DD HH:MM] [LEVEL] Message Since it's not unusual to spawn a lot of different terminal emulators without restarting, Alacritty can create a ton of different log files. To combat this problem, logfiles are removed by default after Alacritty has been closed. If the user wants to persist the log of a single session, the `--persistent_logging` option can be used. For persisting all log files, the `persistent_logging` option can be set in the configuration file
* Fix blurry fonts without dynamic paddingChristian Duerr2018-11-16
| | | | | | | There were some minor rounding issues in the padding codepath without dynamic padding. These have been fixed, which should resolve issues with blurry fonts on monitors with a fractional DPR. This fixes https://github.com/jwilm/alacritty/issues/1806.
* Add option for dynamic padding (#1780)Christian Duerr2018-11-15
| | | | | | | | | | | This adds the `window.dynamic_padding` option which allows disabling the dynamic spread of additional padding around the grid's content. Based on the feedback I've gotten so far and the fact that most other terminal emulators do not seem to center the content inside themselves, I've changed the default configuration option to disable centering of the grid. This fixes #1778.
* Fix specifying 0 lines/columns in config fileChristian Duerr2018-11-13
| | | | | | | | The logic during the initial spawning of the window was a bit twisted up. This has been resolved and it should all work properly now, even without a resize event at startup. This fixes #1781.
* Fix incorrect padding calculationsChristian Duerr2018-11-12
| | | | | | | | | | | | | | | | | | | | The extra window padding was calculated in the renderer which lead to problems with the paddings calculated in the `src/display.rs` and `src/term/mod.rs`. As a solution, every instance of `config.padding().x/y` has been removed from the renderer (`src/renderer/mod.rs`), instead the padding is always passed through from the `src/display.rs`. The initial calculations during display creation and after resize then are scaled appropriately and then the extra padding is calculated. As a result every other location can just make use of the correctly calculated `size_info.padding_x` and `size_info.padding_y`. The documentation has been changed to clearly state that the padding is scaled by DPI now. This fixes #1773.
* Center the grid inside the windowChristian Duerr2018-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | Currently alacritty always puts the grid at the top-left position of the window. The only distance to the top-left window border is set by the padding in the config. However the grid always has a fixed size, and if a cell doesn't completely fit the screen anymore, the padding at the bottom right window corner can be significantly bigger than the padding at the top left. To fix this whenever there is more space left and there would usually be a bigger padding at the bottom right, the space is now split up and added to the padding. This should always center the grid inside the window and make sure all borders have the same padding from the text area. This screenshot shows how it has been until now: ![Before](https://u.teknik.io/kRJwg.png) Here is how it looks now: ![After](https://u.teknik.io/m4puV.png) This fixes #1065.
* Set env variables before window startChristian Duerr2018-11-11
| | | | | | | | The environment variables specified in the configuration file are now all set before the window is created. As a result, this makes it possible to add the `WINIT_HIDPI_FACTOR` env variable directly to the Alacritty configuration. This fixes https://github.com/jwilm/alacritty/issues/1768.
* Remove re-export of glutin size typesChristian Duerr2018-11-10
|
* Upgrade Glutin to v0.19.0Matt Keeler2018-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some changes include: • Use the with_hardware_acceleration function on the ContextBuilder to not require the discrete GPU • Remove the LMenu and RMenu virtual key codes (winit 0.16.0 removed these because Windows now generates LAlt and RAlt instead • Replace set_cursor_state with hide_cursor (winit 0.16.0 removed the set_cursor_state function) • Replace GlWindow::hidpi_factor with GlWindow::get_hidpi_factor and change to expecting an f64 • Use the glutin/winit dpi size and position types where possible Glutin's dpi change event has been implemented. All size events now return logical sizes. As a result of that, the logical sizes are translated in the `display::handle_rezize` method so DPI scaling works correctly. When the DPI is changed, the glyph cache is updated to make use of the correct font size again. Moving a window to a different screen which is a different DPI caused a racing condition where the logical size of the event was sent to the `handle_resize` method in `src/display.rs`, however if there was a DPI change event before `handle_resize` is able to process this message, it would incorrectly use the new DPI to scale the resize event. To solve this issue instead of sending the logical size to the `handle_resize` method and then converting it to a physical size in there, the `LogicalSize` of the resize event is transformed into a `PhysicalSize` as soon as it's received. This fixes potential racing conditions since all events are processed in order. The padding has been changed so it's also scaled by DPR. The `scale_with_dpi` config option has been removed. If it's not present a warning will be emitted. The `winit` dependency on Windows has been removed. All interactions with winit in Alacritty are handled through glutin.
* Fix clippy issuesChristian Duerr2018-11-04
| | | | This resolves all existing clippy issues and removes some old `allow` annotations which aren't neccesary anymore.
* Fix selection while scrollingNathan Lilienthal2018-11-02
| | | | | | | Properly update an active selection while scrolling the main scrollback buffer. This does not affect the alternate screen buffer, since no scrollback buffer is available.
* Fix default hollow cursor behavior with empty confChristian Duerr2018-11-01
| | | | | | | | | | | The 2c37da48b580237ff48f5e841015134dd459b41d change introduced some changes to the way cursor configuration is handled. However it did not properly handle the default behavior of the hollow cursor when the `cursor` field was not specified at all. By implementing the `Default` trait for the `Cursor` struct in `config.rs` manually, the default value of the `unfocused_hollow` field has been corrected back to `true` when the `cursor` struct isn't present at all.
* Fix mouse pasting in mouse mode with shiftChristian Duerr2018-11-01
| | | | | | | It is now possible to paste in mouse mode again by making use of the `shift` key while pressing the mouse button reserved for PasteSelection. All mouse bindings are now also matching the modifiers in a relaxed way, so extra modifiers are ignored.
* Rework cursor configurationChristian Duerr2018-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of cursor-related options in the Alacritty config file now, however they aren't grouped together in any way. To resolve this a new `cursor` field has been added where all cursor configuration options (besides colors) have been moved. The `custom_cursor_colors` option has also been removed, since it's not necessary anymore. Simply making the `colors.cursor.*` fields optional, allows overriding the cursor colors whenever one of them is present. Like that the user doesn't have to think about a relation between two separate configuration options. This PR initially put the `hide_cursor_when_typing` variable under `cursor.hide_when_typing`. However this field is completely unrelated to the cursor, but instead relates to the mouse cursor. Since the word `cursor` is already used for the active cell in the grid of a terminal emulator, all occurences of the word `cursor` when talking about the mouse have been replaced with the word `mouse`. The configuration option has also been moved to `mouse.hide_when_typing`, to make it clear what this option is changing. This fixes #1080.
* Update serde_yaml to 0.8Do Duy2018-11-01
| | | | This fixes jwilm/alacritty#1730.
* Explicitly detach from the console on exitZac Pullar-Strecker2018-10-28
| | | | Without this cmd won't redraw it's prompt when alacritty exits
* Refactor platform-specific codeChristian Duerr2018-10-27
|
* Relax matching of URL modifiersChristian Duerr2018-10-27
| | | | | | | | | | | | | | To click on links in the alternate screen buffer, it is necessary that the `shift` button is held down, otherwise mouse events are captured by the application. However this would also require that `Shift` is added to the `mouse.url.modifiers` option. Thus it is not possible anymore to click on URLs unless the shift button is always held down. To resolve this issue, the matching of modifiers has been relaxed. If a modifier is specified in the config, it is always required to be held down. However if a modifier is held down which is not specified, it is still accpeted. This one-way relaxed matching allows clicking on links with or without shift held down without having to make use of the `mouse.url.modifiers` setting at all.
* Add option to open URLs on clickChristian Duerr2018-10-22
| | | | | | | | | | | | | | | | | | | | | | This adds the option to automatically launch URLs with a specified program when clicking on them. The config option `mouse.url_launcher` has been added to specify which program should be used to open the URL. The URL is always passed as the last parameter to the specified command. It is not always desired for URLs to open automatically when clicking on them. To resolve this a new `modifiers` field has been introduced to the config, which allows specifying which keyboard modifiers need to be held down to launch URLs in the specified launcher. Some tests have been added to make sure that the edge-cases of the URL parsing are protected against future regressions. To make testing easier the parsing method has been moved into the `SemanticSearch` trait. The name of the trait has also been changed to just `Search` and it has been moved to `src/term/mod.rs` to fit the additional functionality. This fixes #113.
* Fix rotation of selection below 0Christian Duerr2018-10-20
| | | | | | | | | | | | | | Whenever the viewport is scrolled, the selection is rotated to make sure that it moves with the viewport. However this did not correctly handle the underflow that happens when the selection goes below 0. This resolves that problem for the selection by moving the internal line representation to an isize, thus correctly keeping track of the selection start/end points even when they have a negative index. Once the selection is converted to a span, the lines are clamped to the visible region. This fixes #1640 and fixes #1643.
* Attach to the console of the parent process on windowsZac Pullar-Strecker2018-10-18
| | | | This fixes not seeing console output on windows release builds.
* Allow the usage of scancodes in the configChristian Duerr2018-10-16
| | | | | | | | | | | | | | | This change should allow the usage of scancodes in the configuration file. When a VirtualKeyCode for glutin is not present, this should now allow the user to use the scancodes instead. If the user specifiecs a key with its scancode even though the key has a VirtualKeyCode, it should still work. The behavior of directly specifying a VirtualKeyCode should be unchanged by this. This fixes #1265.
* Add support for Windows (#1374)Zac Pullar-Strecker2018-10-16
| | | | | | | | | | | | | | | Initial support for Windows is implemented using the winpty translation layer. Clipboard support for Windows is provided through the `clipboard` crate, and font rasterization is provided by RustType. The tty.rs file has been split into OS-specific files to separate standard pty handling from the winpty implementation. Several binary components are fetched via build script on windows including libclang and winpty. These could be integrated more directly in the future either by building those dependencies as part of the Alacritty build process or by leveraging git lfs to store the artifacts. Fixes #28.
* fix erroneous indexed_color resultsRobert Martin Winterstein2018-10-07
|
* Drop terminal lock before renderingtrimental2018-09-30
| | | | | | | | The terminal lock is now dropped before rendering by storing all grid cells before clearing the screen. This frees the terminal to do other things since the lock is now free, which lead to a performance benefit with high throughput applications.
* Fix failing test with `bench` featureChristian Duerr2018-09-29
| | | | | | | | | | | | Using the `bench` feature, `cargo test` was failing since one of the benchmarks was running into a debug assertion for attempting to access a line with an index beyond the grid length. Since this issue was caused by the `len` property not being serialized and deserialized, the `#[serde(skip)]` attribute has been changed to `#[serde(default)]`. The ref-test has been edited to include the correct grid length for proper deserialization. This fixes #1604.
* Fix rendering of selections outside the viewportChristian Duerr2018-09-28
| | | | | | | | | | | | | | | | | When rendering selections with both start and end outside of the visible area, Alacritty would assume that both start and end are either above or below the viewport and not render the selection at all. To fix this the `buffer_line_to_visible` method now returns a `ViewportPosition` instead of an `Option<Line>`, this allows giving more feedback about where outside of the visible region the line is using the `ViewportPosition::Above` and `ViewportPosition::Below` variants. Using these newly introduced variants, a selection spanning the whole screen is now rendered if the selection should go from above the visible area to below it. This fixes #1557.
* Fix deserialization of old decorations valuesChristian Duerr2018-09-28
| | | | | | | | | | The deprecated `window.decoration` values `true` and `false` were using the `visit_bool` visitor for serde. However, only the `str` visitor was ever called. To print the correct deprecation notice, the bool visitor has been removed and the warning has been added for the `"true"` and `"false"` str visitor.
* Fix selection start point lagging behind cursorChristian Duerr2018-09-27
| | | | | | | | | | | | | | | | Since the mouse start position has been the first movement event after the mouse button was held down, there have been some issues with the start point lagging behind the cursor because movement events were not reported from the initial position but there was a gap until movement starts reporting. To fix this whenever the mouse button is pressed, the position and cell side is stored on the `Mouse` struct. Because of this it does not matter anymore if the movement events are all reported and we can just start a selection using the stored position/side whenever there currently is no selection present. This fixes #1366
* Fix selection of empty linesChristian Duerr2018-09-26
| | | | | | | | | | | | When selecting multiple lines in Alacritty, there was an issue with empty lines not being copied. This behavior has been chanaged so empty lines should be correctly copied now. When copying content which ends with an empty line, Alacritty would copy an additional empty line. This has been resolved by only adding empty lines when the empty line was not in the last selected line.
* Implement CNL and CPL escape codes (#1590)Niklas Claesson2018-09-26
|
* Add standalone terminfo definitionDaniel Eklöf2018-09-24
| | | | | | | | | | | | This replaces the current definitions, which depend on the system's 'xterm-256color' terminfo definition with the `alacritty` and `alacritty-direct` definitions. The new definitions are completely standalone. The default `TERM` value has been changed to be dynamically set based on the definitions installed on the system. Alacritty will try to use the `alacritty` definition first and fall back to `xterm-256color` if the `alacritty` definition is not present.
* Dynamically initialize grid storageChristian Duerr2018-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty has initialized all lines in the buffer as soon as it is started. This had the effect that terminals which aren't making use of the scrollback buffer yet, would still consume large amounts of memory, potentially even freezing the system at startup. To resolve this problem, the grid is now dynamically resized in chunks of `1000` rows. The initial size is just the visible area itself, then every time lines are written to the terminal emulator, the grid storage is grown when required. With the worst-case scenario of having 100_000 lines scrollback configured, this change improves startup performance at the cost of scrolling performance. On my machine the startup changes from ~0.3 to ~0.2 seconds. The scrolling performance with large throughput is not affected, however it is slowed down when the number of lines scrolled are close to the 100_000 configured as scrollback. The most taxing benchmark I've found for this was running `yes | dd count=500 > 500.txt` (note the relatively small file size). This will cause a slowdown on the first run from 0.05s to 0.15s. While this is significant, it lines up with the time saved at startup. This fixes #1236.