Skip to content

NSComboBoxCell: completedString: returns nil on no match#484

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/nscomboboxcell-completedstring-nil
Open

NSComboBoxCell: completedString: returns nil on no match#484
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/nscomboboxcell-completedstring-nil

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

-[NSComboBoxCell completedString:] returned the substring itself when no
item in the list completed it. OS X returns nil in that case, which is
how a caller distinguishes "no completion" from "the text is already a
complete item". Return nil when nothing matches. The two internal
callers already handle a nil result. Verified on a macOS runner:
completedString: for a non-matching prefix returns nil.

Adds a test for the no-match case.

@DTW-Thalion DTW-Thalion requested a review from fredkiefer as a code owner July 12, 2026 15:06
@DTW-Thalion DTW-Thalion force-pushed the fix/nscomboboxcell-completedstring-nil branch 3 times, most recently from c3bc89d to 2360267 Compare July 12, 2026 20:41
completedString: echoed the substring back when no item completed it;
OS X returns nil.  Return nil so callers can tell that there was no
completion.
@DTW-Thalion DTW-Thalion force-pushed the fix/nscomboboxcell-completedstring-nil branch from 2360267 to 60cdb50 Compare July 12, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant