summaryrefslogtreecommitdiffstats
path: root/tests/ref.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-02-07 22:36:45 +0000
committerGitHub <noreply@github.com>2019-02-07 22:36:45 +0000
commit35efb4619c4b7a77b3c30de763856bc4441e236e (patch)
tree99aa70b58f97bd57c2a654e3177eae0ea0b572fa /tests/ref.rs
parente561ae373393e919cf3dbbf123a98e0aad215dbc (diff)
Dynamically resize terminal for errors/warnings
The warning and error messages now don't overwrite other terminal content anymore but instead resize the terminal to make sure that text can always be read. Instead of just showing that there is a new error and pointing to the log, errors will now be displayed fully in multiple lines of text, assuming that there is enough space left in the terminal. Explicit mouse click handling has also been added to the message bar, which made it possible to add a simple `close` button in the form of `[X]`. Alacritty's log file location is now stored in the `$ALACRITTY_LOG` environment variable which the shell inherits automatically. Previously there were some issues with the log file only being deleted when certain methods for closing Alacritty were used (like typing `exit`). This has been reworked and now Ctrl+D, exit and signals should all work properly. Before the config is reloaded, all current messages are now dropped. This should help with multiple terminals all getting clogged up at the same time when the config is broken. When one message is removed, all other duplicate messages are automatically removed too.
Diffstat (limited to 'tests/ref.rs')
-rw-r--r--tests/ref.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ref.rs b/tests/ref.rs
index 1ab012d4..75c6e459 100644
--- a/tests/ref.rs
+++ b/tests/ref.rs
@@ -10,10 +10,11 @@ use alacritty::Grid;
use alacritty::Term;
use alacritty::ansi;
use alacritty::index::Column;
-use alacritty::term::Cell;
+use alacritty::term::cell::Cell;
use alacritty::term::SizeInfo;
use alacritty::util::fmt::{Red, Green};
use alacritty::config::Config;
+use alacritty::message_bar::MessageBuffer;
macro_rules! ref_tests {
($($name:ident)*) => {
@@ -90,7 +91,7 @@ fn ref_test(dir: &Path) {
let mut config: Config = Default::default();
config.set_history(ref_config.history_size);
- let mut terminal = Term::new(&config, size);
+ let mut terminal = Term::new(&config, size, MessageBuffer::new());
let mut parser = ansi::Processor::new();
for byte in recording {