Skip to content

[BUG] NK_EDIT_AUTO_SELECT ignored when combined with NK_EDIT_GOTO_END_ON_ACTIVATE #838

@PavelSharp

Description

@PavelSharp

Hello! I've probably found a new problem. When using text edit widgets (e.g. nk_edit_buffer or nk_edit_string_zero_terminated) with both flags
NK_EDIT_GOTO_END_ON_ACTIVATE | NK_EDIT_AUTO_SELECT, the expected behavior does not occur.
Expected behavior
When activated, the cursor should move to the end and all text should be selected.
For example, for nk_edit_buffer, we expect the internal state of nk_text_edit to be:

select_start = 0;
select_end = cursor = (text length);

Actual behavior
The cursor correctly moves to the end, but the text is not selected.
Observed nk_text_edit values:

select_start = select_end = 0;
cursor = (text length);

It looks like NK_EDIT_AUTO_SELECT is ignored when NK_EDIT_GOTO_END_ON_ACTIVATE is also present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions