Skip to content

feat: match anywhere in filename during interactive search#3718

Open
KonTy wants to merge 1 commit intolinuxmint:masterfrom
KonTy:feature/substring-search
Open

feat: match anywhere in filename during interactive search#3718
KonTy wants to merge 1 commit intolinuxmint:masterfrom
KonTy:feature/substring-search

Conversation

@KonTy
Copy link

@KonTy KonTy commented Mar 6, 2026

Summary

Changes the interactive type-ahead search (the search that activates when you start typing in a file view) to match anywhere in the filename instead of only matching from the beginning.

Changes

  • Icon view (nemo-icon-container.c): Changed strncmp(key, name, strlen(key))strstr(name, key) so typing e.g. "log" matches "changelog.txt"
  • List view (nemo-list-view.c): Added a custom search_equal_func that normalizes both the search key and filename to UTF-8 NFD + casefold, then uses strstr for substring matching

Motivation

The prefix-only matching behavior is unintuitive — users often know part of a filename but not the exact beginning. Substring matching is the standard in most modern file managers.

Inspired by #3714

Previously, type-ahead search only matched at the start of filenames.
Now it matches anywhere in the filename (case insensitive).

For example, typing 'demo' will now find 'preview-demo.gif'.

Applies to both icon view and list view.

Closes linuxmint#2660
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.

1 participant