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

GUACAMOLE-1632: Fill null chars before last printable char with spaces #523

Conversation

corentin-soriano
Copy link
Contributor

This selection :
image

Clipboard content before this code:

/* Pass through start/end coordinates if they are already in the expected
     * order, adjusting only for final character width */
    if (terminal->selection_start_row < terminal->selection_end_row
|| (terminal->selection_start_row == terminal->selection_end_row
&& terminal->selection_start_column < terminal->selection_end_column)) {

*start_row = terminal->selection_start_row;
*start_col = terminal->selection_start_column;
*end_row   = terminal->selection_end_row;
*end_col   = terminal->selection_end_column + terminal->selection_end_width - 1;

}

And now:

    /* Pass through start/end coordinates if they are already in the expected
     * order, adjusting only for final character width */
    if (terminal->selection_start_row < terminal->selection_end_row
        || (terminal->selection_start_row == terminal->selection_end_row
            && terminal->selection_start_column < terminal->selection_end_column)) {

        *start_row = terminal->selection_start_row;
        *start_col = terminal->selection_start_column;
        *end_row   = terminal->selection_end_row;
        *end_col   = terminal->selection_end_column + terminal->selection_end_width - 1;

    }

@corentin-soriano corentin-soriano changed the base branch from main to patch June 7, 2024 17:26
src/terminal/select.c Outdated Show resolved Hide resolved
@corentin-soriano corentin-soriano force-pushed the GUACAMOLE-1632_append_spaces_clipboard branch from a2b4aaf to 7692547 Compare June 11, 2024 08:56
Copy link
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this closes #404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants