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

Fix regression in shift-arrow behavior on filled words. #162

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

jpd236
Copy link
Contributor

@jpd236 jpd236 commented Aug 16, 2021

In the old logic, we only moved to the start of a word explicitly when
the arrow direction and focused direction were different:

// Find the first square in the word

The new logic applied this unconditionally. In most cases, this seems to
have the same behavior, in that if the word being moved to has any blank
squares, we move to the first blank in the word anyway. But if the word
being moved to is full, we should stay in line with the current focused
square to avoid jumping around the grid. This makes it easier to
navigate through a filled section of the grid.

Fixes #160

In the old logic, we only moved to the start of a word explicitly when
the arrow direction and focused direction were different:

https://github.com/mrichards42/xword/blob/cd5d08cf9cd053025a6baa92ad13b818b1e3f7c8/src/XGridCtrl.cpp#L1674

The new logic applied this unconditionally. In most cases, this seems to
have the same behavior, in that if the word being moved to has any blank
squares, we move to the first blank in the word anyway. But if the word
being moved to is full, we should stay in line with the current focused
square to avoid jumping around the grid. This makes it easier to
navigate through a filled section of the grid.
@mrichards42
Copy link
Owner

Makes sense to me, thanks!

@mrichards42 mrichards42 merged commit e5609e1 into mrichards42:master Aug 18, 2021
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.

Change in shift-arrow behavior on a filled word
2 participants