Skip to content

Upgrade terminfo #7133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/libextra/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use core::os;
use terminfo::*;
use terminfo::searcher::open;
use terminfo::parser::compiled::parse;
use terminfo::parm::{expand, Number};
use terminfo::parm::{expand, Number, Variables};

// FIXME (#2807): Windows support.

Expand Down Expand Up @@ -84,7 +84,7 @@ impl Terminal {
pub fn fg(&self, color: u8) {
if self.color_supported {
let s = expand(*self.ti.strings.find_equiv(&("setaf")).unwrap(),
[Number(color as int)], [], []);
[Number(color as int)], &mut Variables::new());
if s.is_ok() {
self.out.write(s.get());
} else {
Expand All @@ -95,7 +95,7 @@ impl Terminal {
pub fn bg(&self, color: u8) {
if self.color_supported {
let s = expand(*self.ti.strings.find_equiv(&("setab")).unwrap(),
[Number(color as int)], [], []);
[Number(color as int)], &mut Variables::new());
if s.is_ok() {
self.out.write(s.get());
} else {
Expand All @@ -105,7 +105,8 @@ impl Terminal {
}
pub fn reset(&self) {
if self.color_supported {
let s = expand(*self.ti.strings.find_equiv(&("op")).unwrap(), [], [], []);
let mut vars = Variables::new();
let s = expand(*self.ti.strings.find_equiv(&("op")).unwrap(), [], &mut vars);
if s.is_ok() {
self.out.write(s.get());
} else {
Expand Down
Loading