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) => {
|
||||
println!("{:?}", user_event);
|
||||
match user_event {
|
||||
TermEvent::PtyWrite(text) => notifier.notify(text.into_bytes()),
|
||||
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: skip leading spacer?
|
||||
if indexed.cell.flags.contains(Flags::WIDE_CHAR_SPACER) {
|
||||
// Skip wide spacers (cells after wide characters)
|
||||
continue;
|
||||
}
|
||||
|
||||
let start = text.len();
|
||||
text.push(indexed.cell.c);
|
||||
if let Some(zerowidth) = indexed.cell.zerowidth() {
|
||||
for &c in zerowidth {
|
||||
text.push(c);
|
||||
}
|
||||
}
|
||||
let end = text.len();
|
||||
|
||||
let convert_color = |color| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue