aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
Commit message (Collapse)AuthorAge
* Split alacritty into a separate cratesTheodore Dubois2019-04-28
| | | | | The crate containing the entry point is called alacritty, and the crate containing everything else is called alacritty_terminal.
* Fix macos subprocess executionChristian Duerr2019-04-11
| | | | | | | | This fixes the execution of subprocesses on macOS which could sometimes prevent actions like `SpawnNewProcess` or custom commands from launching their processes correctly. This fixes #2259.
* Revert daemon removalChristian Duerr2019-04-01
| | | | | | | | | | | This reverts the removal of the call to libc::daemon and instead adds an annotation to ignore the deprecation warnings on macos. This will not be an issue in the future since macOS is only discouraging the use of `daemon`, but I'm not aware of any intention to actually remove it. This fixes #2211.
* Add rustfmt style guideChristian Duerr2019-03-30
|
* Remove deprecated libc::daemon callChristian Duerr2019-03-21
| | | | | | | | | | | | | Since version 10.5 of macOS the libc::daemon call has been deprecated. While it is recommended by macOS to use launchd instead, this is not easily available on other unix platforms. However since we just spawn a daemon process to prevent Alacritty from spawning zombies, we can manually invoke `fork` in the child process to cause a double-fork and re-parent the child process under init so it can be reaped automatically. Since the daemon call is not part of POSIX, using the double fork on all unix platforms also has some portability advantages.
* Make start_daemon behaviour on Windows consistent with UnixDavid Hewitt2019-03-04
| | | | | | | In cases where the Alacritty process had invalid std handles then the ConPTY subprocess would fail to spawn. By setting appropriate flags we prevent these handles from being passed to the ConPTY subprocess.
* Add key/mouse action for spawning new Alacritty instancesCarlos Tuñón2019-01-05
|
* 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.
* 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.
* Remove unnecessary clippy lint annotationsMatthias Krüger2018-07-01
| | | | | | | We moved to "cargo clippy" in 5ba34d4f9766a55a06ed5e3e44cc384af1b09f65 and removing the clippy lint annotations in `src/lib.rs` does not cause any additional warnings. This also changes `cargo clippy` to use the flags required for checking integration tests.
* Change green implementation to use the macroasoderman2018-06-19
|
* Fix clippy lintsChristian Duerr2018-05-11
|
* Add better printing for ref test failureJoe Wilm2017-04-03
| | | | The previous format was extremely difficult for a human to parse.
* Change cursor colors config to use text and cursorJoe Wilm2017-02-25
| | | | | | | | | | | | | 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.
* Clippy fixes!Manish Goregaokar2017-01-06
|
* Add `nightly` feature, use for `unlikely` intrinsicManish Goregaokar2017-01-06
|
* Improve error handling for clipboard actionsJoe Wilm2017-01-01
| | | | | | Previously, these could have crashed alacritty. Now, they simply print an error message in Red to stderr. The Red format wrapper was moved to a central location where both main.rs and the alacritty lib can access it.
* Fix some bugs with selectionsJoe Wilm2016-12-29
| | | | Moving the window on macOS would cause a panic in certain circumstances.
* Remove dead codeJoe Wilm2016-12-16
|
* Misc formatting fixesJoe Wilm2016-12-16
|
* Rustup and update dependenciesJoe Wilm2016-10-14
| | | | Now uses serde_dervive \o/
* Refactor EventLoop into event_loop moduleJoe Wilm2016-09-25
| | | | This type and its implementations were seriously cluttering main.rs.
* Scrolling v2Joe Wilm2016-08-22
| | | | | | | | | | | The previous scrolling + scroll region implementation exhibited display corruption bugs in several applications including tmux, irssi, htop, and vim. The new implementation doesn't seem to suffer from any of those issues. This implementation is able to `find /usr` on my machine (nearly 600k lines) in ~2.0 seconds while st is able to do the same in ~2.2 seconds. Alacritty is officially faster!
* Add license headers to source filesJoe Wilm2016-06-29
|
* Fix all trivial compiler warningsJoe Wilm2016-06-09
| | | | | | | | | | | Of note are the `ansi` and `grid` modules becoming public. There are several bits of unused code in each of these. In the case of `grid`, the unused parts are generally useful, like some indexing implementations. In ansi, there are pieces that will be used once the parser is more complete. In any case, these modules are fairly generic and mostly usable outside of Alacritty. Unused cargo packages were also removed.
* Add support for scrolling regionsJoe Wilm2016-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's now possible to move around within Vim without the screen becoming corrupt! The ANSI parser now calls a (new) `set_scrolling_region` on the handler when the DECSTBM CSI is received. In order to provide a sensible default in case that the sequence doesn't include arguments, a TermInfo trait was added which currently has methods for inspecting number of rows and columns. This was added as an additional trait instead of being included on Handler since they have semantically different purposes. The tests had to be updated to account for the additional trait bounds. The utilities module now has a `Rotate` trait which is implemented for the built-in slice type. This means that slices and anything derefing to a slice can be rotated. Since VecDeque doesn't support slicing (it's a circular buffer), the grid rows are now held in a Vec to support rotation. For ergomomic access to the grid for scrolling and clearing regions, additional Index/IndexMut implementations were added to the grid::Row type. Finally, a `reset` method was added to `Cell` which properly resets the state to default (instead of just clearing the char). This supports region clearing and also fixed a bug where cell backgrounds would remain after being cleared.
* Add named thread for pty readerJoe Wilm2016-06-07