Skip to content
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

make osc52 buffer bigger to cover more use cases #15

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@amosbird
Copy link

commented Mar 19, 2018

This patch is a workaround for issues like jwilm/alacritty#1002 .

make osc52 buffer bigger to cover more use cases
This patch is a workaround for issues like jwilm/alacritty#1002 .
@Mic92

This comment has been minimized.

Copy link

commented Nov 24, 2018

Thanks. Finally I can copy files transparently to my clipboard!

@h-michael

This comment has been minimized.

Copy link

commented Jan 24, 2019

@jwilm Hi, how is going this pr?

@Mic92

This comment has been minimized.

Copy link

commented Jan 24, 2019

This patch is just a workaround. It would need some dynamic memory allocation I guess.

wez added a commit to wez/vte that referenced this pull request Mar 17, 2019

Use dynamically sized buffer for OSC
Whilst playing around with vte and processing iTerm2's image protocol,
I ran into the relatively small statically sized OSC buffer.

This diff switches the buffer from a static array to use a `Vec<u8>`.  I
did briefly experiment with just making this buffer much larger (as
jwilm#15 does), but even at 1MB (which is
too small for images) that size can lead to a stack overflow during
initialization.

In order to preserve building in a `no_std` environment this is done
conditionally.  I've followed the pattern used in other crates with
similar requirements:

* Introduced a `std` feature to signal that `std` is ok
* The `std` feature is on by default
* `no_std` crates that consume this one will need to set `vte` to
  `default-features = false` in their deps
* I've bumped the version in order to avoid breaking `no_std`
  consumers

Test Plan:

```
$ cargo test --no-default-features
$ cargo test
```

Refs: jwilm/alacritty#1002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.