Allow setting title and add zero width text to buffer
This commit is contained in:
parent
b8912337f8
commit
f2d716ea7b
1 changed files with 15 additions and 1 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -429,8 +429,11 @@ fn main() {
|
||||||
WinitEvent::UserEvent(user_event) => {
|
WinitEvent::UserEvent(user_event) => {
|
||||||
println!("{:?}", user_event);
|
println!("{:?}", user_event);
|
||||||
match user_event {
|
match user_event {
|
||||||
TermEvent::PtyWrite(text) => notifier.notify(text.into_bytes()),
|
|
||||||
TermEvent::Exit => elwt.exit(),
|
TermEvent::Exit => elwt.exit(),
|
||||||
|
TermEvent::PtyWrite(text) => notifier.notify(text.into_bytes()),
|
||||||
|
TermEvent::Title(title) => {
|
||||||
|
window.set_title(&title);
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -465,8 +468,19 @@ fn main() {
|
||||||
}
|
}
|
||||||
//TODO: use indexed.point.column?
|
//TODO: use indexed.point.column?
|
||||||
|
|
||||||
|
//TODO: skip leading spacer?
|
||||||
|
if indexed.cell.flags.contains(Flags::WIDE_CHAR_SPACER) {
|
||||||
|
// Skip wide spacers (cells after wide characters)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let start = text.len();
|
let start = text.len();
|
||||||
text.push(indexed.cell.c);
|
text.push(indexed.cell.c);
|
||||||
|
if let Some(zerowidth) = indexed.cell.zerowidth() {
|
||||||
|
for &c in zerowidth {
|
||||||
|
text.push(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
let end = text.len();
|
let end = text.len();
|
||||||
|
|
||||||
let convert_color = |color| {
|
let convert_color = |color| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue