aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Implement mouse scrolling with line deltasJoe Wilm2016-12-11
| | | | | This makes scrolling work for mouse wheels (was previously just trackpads).
* Finish main.rs cleanupJoe Wilm2016-12-11
| | | | | | | | * config::Monitor is more ergonomic and self-contained * Fixed an issue with macOS resize. Previously, the terminal was marked as dirty in the window resize handler, but the display can't do that. Instead, the event processor returns a flag whether it was requested to wakeup.
* Display manages window, renderer, rasterizerJoe Wilm2016-12-11
| | | | | | | | | | 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.
* Add run() function and document itJoe Wilm2016-12-11
| | | | The doc comment outlines my plan about cleaning up this function.
* Add display impl for Points<T>Joe Wilm2016-12-11
|
* Cleaning up main; Added window moduleJoe Wilm2016-12-11
| | | | | | | | Adds a wrapper for the glutin::Window which provides strongly typed APIs and more convenient interfaces. Moves some gl calls into the opengl-based renderer. The point of most of the changes here is to clean up main().
* Move config path into Config typeJoe Wilm2016-12-11
| | | | | This cleans up the Config::load API significantly. Several miscellaneous comments were also added.
* Cleanup cli option parsingJoe Wilm2016-12-11
| | | | | | This introduces the `cli` module and the `cli::Options` type. This type holds all the options passable on the command line in addition to providing arg parsing.
* Force drawing when config reloadsJoe Wilm2016-12-11
|
* Implement Handler::identify_terminal for TermJoe Wilm2016-12-11
| | | | | The identify_terminal function signature had to change to support writing to the terminal before processing additional input.
* Add comments in main loopJoe Wilm2016-12-11
|
* Borrow glutin::Window instead of using ArcJoe Wilm2016-12-11
| | | | | | | glutin::Window is not threadsafe; putting it into an Arc is misleading (although the glutin::Window type claims to be Send + Sync). The reference was just needed on the main thread anyway, so it's better to just pass a ref around directly.
* Refactor color list managementJoe Wilm2016-12-11
| | | | | | | | There's now a ColorList type that provides strongly typed indexing for not only usize but NamedColor as well. Previously, the `NamedColor` was casted to a `usize` when indexing the colors. Additionally, only one copy of the ColorList needs to exist;it's borrowed from the `Config` when rendering, and the renderer doesn't need a copy.
* Add support for indexed colorsJoe Wilm2016-12-11
| | | | | | | | 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.
* Rename RenderApi::render_grid() to render_cells()Joe Wilm2016-12-11
| | | | | | | This probably should have been renamed in the original refactor, but oh well. `render_cells()` takes a generic parameter `I` which is any `Iterator<Item=IndexedCell>` and is thus no longer coupled to the grid type. Renaming it reflects that.
* Add support for bracketed pasteJoe Wilm2016-12-11
| | | | | Binding/Action execute now has access to TermMode to support bracketed paste mode.
* Move term::cell module to its own fileJoe Wilm2016-12-11
| | | | | The cell module was previously implemented within term.rs. Now each module has its own file.
* Document a couple of methodsJoe Wilm2016-12-11
| | | | Also fixes formatting on the Term::new method signature.
* Refactor cell selection out of rendererJoe Wilm2016-12-11
| | | | | | | | | | | | | | The terminal now has a `renderable_cells()` function that returns a `RenderableCellIter` iterator. This allows reuse of the cell selection code by multiple renderers, makes it testable, and makes it independently optimizable. The render API now takes an `Iterator<Item=IndexedCell>` to support both the new renderable cells iterator and the `render_string()` method which generates its own iterator. The `vim_large_window_scoll` ref test was added here because it provides a nice large and busy grid to benchmark the cell selection with.
* Refactor limit functionJoe Wilm2016-12-11
| | | | | Was reading through the code and realized this function could be cleaned up significantly.
* Support trackpad scrollingJoe Wilm2016-12-11
| | | | Linebased scrolling is still unsupported (need a mouse to test with).
* Support normal mouse tracking modeJoe Wilm2016-12-11
| | | | This allows the user for eg clicking columnts in htop to sort.
* Use checked subtraction for backspaceJoe Wilm2016-12-10
| | | | Some shells will send a backspace at column 0, apparently.
* Fix mouse bindingsJoe Wilm2016-11-19
| | | | Config expected key and the default config file had the wrong section.
* Add a number of simple ref-testsJoe Wilm2016-11-19
| | | | Also adds a feature `err-println` for enabling `err_println!` printing.
* Add support for recording/running ref testsJoe Wilm2016-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref tests use a recording of the terminal protocol and a serialization of the grid state to check that the parsing and action handling systems produce the correct result. Ref tests may be recorded by running alacritty with `--ref-test` and closing the terminal by using the window "X" button. At that point, the recording is fully written to disk, and a serialization of important state is recorded. Those files should be moved to an appropriate folder in the `tests/ref/` tree, and the `ref_test!` macro invocation should be updated accordingly. A couple of changes were necessary to make this work: * Ref tests shouldn't create a pty; the pty was refactored out of the `Term` type. * Repeatable lines/cols were needed; on startup, the terminal is resized * by default to 80x24 though that may be changed by passing `--dimensions w h`. * Calculating window size based on desired rows/columns and font metrics required making load_font callable multiple times. * Refactor types into library crate so they may be imported in an integration test. * A whole bunch of types needed symmetric serialization and deserialization. Mostly this was just adding derives, but the custom deserialization of Rgb had to change to a deserialize_with function. This initially adds one ref test as a sanity check, and more will be added in subsequent commits. This initial ref tests just starts the terminal and runs `ll`.
* Make bindings configurable from alacritty.ymlJoe Wilm2016-11-17
| | | | | | | | | | | | | | | Bindings were previously hardcoded within input.rs; adding, removing, or changing a binding required a recompile! Now, bindings may be declared in alacritty.yml. Even better, bindings are live-reloaded when alacritty.yml is changed! One unexpected benefit of this change was that all of the special casing in input.rs has disappeared. Conversely, config.rs has gained complexity for all of the deserialization logic. Resolves #3.
* Fix test for Cell layoutJoe Wilm2016-11-17
| | | | bytes 2 and 3 are not necessarily zeroed
* Redraw screen on focusJoe Wilm2016-11-17
| | | | | Fixes an issue where waking from sleep on macOS would continue showing the lock screen if Alacritty was the active app.
* Fallback to received chars when no bindingsJoe Wilm2016-11-17
| | | | | Committed this on a plane with no internet; need to get a real glutin ref pushed somewhere and update this commit before merging into master.
* Fix/add some keybindingsJoe Wilm2016-11-11
| | | | | | | Adds support for pageup, pagedown, home, and end. Fixes delete inserting spaces. Resolves #15.
* Fix alacritty shutdown when shell exits on macOSJoe Wilm2016-11-11
| | | | | | | Readiness for the pty file descriptor will never be HUP or ERROR; the out-of-band flag raised by sigchld is used instead. Resolves #14.
* Fix resize on macOS leaving screen blankJoe Wilm2016-11-11
| | | | | | | | This still has a problem where intermediate sizes are not drawn. Apparently cocoa blocks the event loop during resize. This needs to be fixed in Glutin. Resolves #16.
* Fix config file reloading on macOSJoe Wilm2016-11-11
|
* Workaround for cutoff glyphsJoe Wilm2016-11-11
| | | | | | | There's an issue where drawing the cell backgrounds will overwrite part of a neighboring glyph. The real solution here is to figure out glyph metrics properly, but simply limiting to 2 draw calls per frame (first background, then all the glyphs) makes the problem "go away".
* Support drawing bold test with bright colorsJoe Wilm2016-10-28
| | | | This feature is on by default
* Merge branch 'reload-colors'Joe Wilm2016-10-28
|\
| * Set colors on CPUJoe Wilm2016-10-28
| | | | | | | | | | | | Indexing colors on the vertex shader added complexity and after profiling suggests perf is basically the same. This commit will still be here in case it makes sense to try this again at some point.
| * Dynamically update render_timer configJoe Wilm2016-10-28
| | | | | | | | Everything else was already in place, just needed to set the flag.
| * Move config reloading to separate threadJoe Wilm2016-10-27
| | | | | | | | | | | | This feature was previously shoved into the renderer due to initial proof of concept. Now, providing config updates to other systems is possible. This will be especially important for key bindings!
| * Move color indexing to vertex shaderJoe Wilm2016-10-24
| | | | | | | | | | | | Move more work to GPU from CPU. Some very non-scientific profiling suggests this is implementation is more performant, but more work should be done there.
| * Expand cell::Color layout testsJoe Wilm2016-10-24
| | | | | | | | The whole enumeration should be well defined for the renderer.
| * Fix some compiler warningsJoe Wilm2016-10-24
| |
| * Add discriminant_value test for cell::ColorJoe Wilm2016-10-24
| | | | | | | | | | The renderer should be able to use the discriminant_value to determine vertex colors.
| * Proof of concept live reloading for colorsJoe Wilm2016-10-23
| | | | | | | | | | | | | | The architecture here is really poor. Need to move file watching into a dedicated location and probably have an spmc broadcast queue. other modules besides rendering will care about config reloading in the future.
* | Live shader reloading is now a featureJoe Wilm2016-10-27
|/ | | | | | Which means it can be disabled in release builds. No more working on a renderer feature and actually breaking the Alacritty your editor is running inside.
* Add test exhibiting SIGBUS on my machineJoe Wilm2016-10-16
|
* Make colors configurable from fileJoe Wilm2016-10-15
| | | | | | Added solarized dark color scheme for testing purposes. Resolves #1.
* Rustup and update dependenciesJoe Wilm2016-10-14
| | | | Now uses serde_dervive \o/
* Implement blank character insertionJoe Wilm2016-10-10
| | | | | This is used by things like Bash's reverse-i-search and things get *very* messed up without it.