aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Fix some bugs with selectionsJoe Wilm2016-12-29
| | | | Moving the window on macOS would cause a panic in certain circumstances.
* Implement clipboard store for x11 with xclipJoe Wilm2016-12-29
|
* Add super hacky underline drawingJoe Wilm2016-12-29
| | | | | | Using underscores because it's easy. It's also wrong. cc #11
* Hopefully fix read not triggering drawJoe Wilm2016-12-29
| | | | | | | | The terminal mutex is no longer released between event processing and doing a draw. This may fix the race condition with data arriving but not being displayed until a subsequent event. cc #29
* Unify Cursor, Location and name it PointJoe Wilm2016-12-29
|
* Add silver searcher ignore fileJoe Wilm2016-12-29
| | | | | Searching on the ref tests would find matches in the terminal recording files and completely screw up the screen state.
* Fix selection copy for long linesJoe Wilm2016-12-29
| | | | | | Long lines were previously broken at the terminal width. Now, a wrapping marker is kept on the final cell so that extra newlines are not inserted.
* Minor cleanup in main()Joe Wilm2016-12-27
|
* Fix bug with config reloadingJoe Wilm2016-12-27
| | | | The reloaded config was not used immediately.
* Implement copying selection for macOSJoe Wilm2016-12-26
| | | | Still need automatic loading into selection copy buffer for linux.
* Refactor bindings and fix binding testsJoe Wilm2016-12-26
| | | | | | | | | | The somewhat redundant KeyBinding and MouseBinding types were removed in favor of a Binding<T> type. This allows all binding code to be reused for both scenarios. The binding tests were fixed by only asserting on `is_triggered_by()` instead of checking that the action escape sequence was delivered properly.
* Major cleanup for event handlingJoe Wilm2016-12-26
| | | | | | | | | | | | | | | | | | | | | | The event handling code grew organically over time, and with that came a number of warts. The primary issue was with passing some random selection of arguments to the input::Processor based on what the input was. There was the issue that if multiple events were drained from a single PollEventsIterator, the terminal mutex was potentially locked and unlocked many times. Finally, and perhaps most importantly, there was no good way to pass necessary state to the Action executor without going through several API layers. To fix all that, the input::ActionContext and input::Processor are now generated once per call to the event::Processor. The input::Processor holds onto the ActionContext so that it doesn't need to be passed through layers of function calls. When a binding is activated, the ActionContext is simply passed to the handler. This did have the effect of breaking the input::Processor tests (specifically, those relating to bindings). The issue was not addressed in this commit since a larger refactor of the bindings is planned which should also improve testability.
* Refactor input processing to take action contextJoe Wilm2016-12-25
| | | | | | | Various functions take some permutation of the current selection, the terminal, and a notifier. Instead of having to juggle some number of arguments everywhere, the `ActionContext` is constructed and then passed around.
* Implement copypasta::Store for macOS pasteboardJoe Wilm2016-12-24
| | | | Only works with strings, currently.
* Implement visual component of mouse selectionsJoe Wilm2016-12-22
| | | | | | This adds the ability to click and drag with the mouse and have the effect of visually selecting text. The ability to copy the selection into a clipboard buffer is not yet implemented.
* Fix config reloadingJoe Wilm2016-12-16
| | | | | The main refactor broke config reloading; specifically, colors were not updating for subsequent draws.
* Remove dead codeJoe Wilm2016-12-16
|
* Misc formatting fixesJoe Wilm2016-12-16
|
* Remove outdated and no longer correct docJoe Wilm2016-12-16
|
* Replace remaining use of `try!` with `?`Joe Wilm2016-12-16
|
* Rustup and clippyJoe Wilm2016-12-16
| | | | All of the changes in this commit are due to clippy lints.
* Merge pull request #27 from quininer/ref_fish_ccJoe Wilm2016-12-16
|\ | | | | add fish_cc ref
| * add fish_cc refquininer kel2016-12-16
|/ | | | and update Cargo.lock
* Handle overflow in Term::move_backwardJoe Wilm2016-12-15
| | | | Resolves #25
* Remove need for Rc<RefCell<_>> usageJoe Wilm2016-12-12
| | | | | | | This adds a trait OnResize and a separate method handle_resize to the display. Instead of having a callback to receive resize events, a list of &mut OnResize are passed to this new method. Doing this allowed the only RefCell usage in the codebase to be removed :).
* Fix a couple of compiler warningsJoe Wilm2016-12-12
|
* Track terminal cells on mouse movementJoe Wilm2016-12-11
| | | | | | | The cell under the cursor is now tracked in the input processor at `self.mouse.line` and `self.mouse.column`. This could probably be optimized to only compute the cell when in certain states, but the calculation is cheap.
* Update nightly pin on travisJoe Wilm2016-12-11
|
* 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.