Skip to content

Fix MaskedInput word nav when template starts with separator#6648

Open
Devil1716 wants to merge 1 commit into
Textualize:mainfrom
Devil1716:fix/masked-input-prev-separator-index-zero
Open

Fix MaskedInput word nav when template starts with separator#6648
Devil1716 wants to merge 1 commit into
Textualize:mainfrom
Devil1716:fix/masked-input-prev-separator-index-zero

Conversation

@Devil1716

Copy link
Copy Markdown

Summary

  • Include index 0 in prev_separator_position scan (range(..., -1, -1)).
  • Use is not None checks in word cursor/delete actions so a separator at index 0 is handled correctly.

Test plan

  • pytest tests/test_masked_input.py::test_cursor_left_word_leading_separator

Fixes #6641

prev_separator_position used range(..., 0, -1), which never visits
index 0. Also treat position 0 as a real separator in cursor/delete
word actions (`if position:` treated 0 as missing).

Fixes Textualize#6641

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant