-
Notifications
You must be signed in to change notification settings - Fork 644
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
GUACAMOLE-1973: Add support for XTerm bracketed-paste mode #533
base: main
Are you sure you want to change the base?
Conversation
6c345ca
to
1a21a56
Compare
@scottp-dpaw Since this is a new feature, and not a bug fix, this can be based against the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two overall concerns with the code, here, as illustrated by the one comment I've left inline, below:
- You've done a reasonable job of documenting things within the code, but there are a few places that could use slightly more documentation.
- There are several places where constants may be useful.
Other than that, I'll let @mike-jumper and @jmuehlner take a closer look, since they're much more familiar with the terminal code than I am.
src/terminal/terminal.c
Outdated
@@ -1500,6 +1501,87 @@ int guac_terminal_send_string(guac_terminal* term, const char* data) { | |||
|
|||
} | |||
|
|||
int guac_terminal_send_clipboard(guac_terminal *term) { | |||
char *filtered = guac_mem_alloc(term->clipboard->length + 12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be completely obvious to you why you need to allocate 12 bytes in addition to the clipboard length, here, but it isn't to me. This is one example of a place where 1) more comments throughout the code might be helpful, and 2) this may be a good place for a constant to replace the literal 12
.
1a21a56
to
d0fc2f8
Compare
No worries. In lieu of making constants for every bitmask, I've added clearer comments describing the sequence of bits that we're trying to find for each codepoint. Hopefully that should provide enough context to the reader about what we're trying to do, if not I'm open to suggestions. |
d0fc2f8
to
6021ddc
Compare
6021ddc
to
25206c9
Compare
No description provided.