Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Extended search mode does not find escape sequences (\t, \n, \r...)

Open Beginner friendly
#1,181 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@CyrilB1531 is already working on this.

Since Oct 28, 2026.

  • #1182 by @CyrilB1531 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
87/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
desktop

Research direction

Start with src/dialogs/FindReplaceDialog.cpp, especially prepareToPerformSearch(), findOptions(), and findAllInCurrentDocument(); trace how the extended search text reaches the Finder. Reproduce with \t in Extended mode in a document containing a tab, then verify Find Next, Count, and Find All find it after the text is converted. Check Replace and Replace All too, since the issue says those search paths are affected.

Written by the indexing model from the issue text.

Description

Operating System and Version

Ubuntu 26.04.1 LTS

Distribution

Built from source (master, 75cb19f)

Description

With the "Extended (\n, \r, \t, \0, \x...)" search mode selected, searching for an
escape sequence such as \t never finds anything, although the document contains
tab characters. The search text is used literally instead of being converted.

This affects Find Next, Count, Find All in Current Document, Find All in All Opened
Documents and Mark All. In the Replace tab, the replacement text is converted
correctly, but the text being searched for is not, so Replace / Replace All do not
find extended sequences either.

The cause seems to be in src/dialogs/FindReplaceDialog.cpp:

  • prepareToPerformSearch() (line 569) converts the text with
    convertToExtended(findText), but findText is a local variable that is never used
    afterwards.
  • It then calls finder->options() = findOptions(), and findOptions() (line 703)
    takes the raw text again with options.text = findString().
  • findAllInCurrentDocument() (line 285) also overwrites the text with
    finder->options().text = findString(), without any conversion.

A possible fix would be to give the converted text to the Finder in
prepareToPerformSearch(), and to stop overwriting it in findAllInCurrentDocument().

Steps to Reproduce
  1. Create a new document and type: col1col2
  2. Open Search > Find... (Ctrl+F)
  3. Select the "Extended" search mode
  4. Type \t in the Find field
  5. Click "Find Next", "Count" or "Find All in Current Document"
    -> "No matches found." / 0 matches, while a tab character is present
  6. Switch to "Normal" mode and type an actual tab character (or select the tab in the
    editor before opening the dialog) -> the tab is found
Debug Information

Notepad Next v0.15
Build Date/Time: Oct 28 2026 21:56:19
Qt: 6.10.2
OS: Ubuntu 26.04.1 LTS
Locale: fr_FR
CPU: x86_64
File Path: /media/Datas3/home/Documents/devs/NotepadNext/build/src/NotepadNext
Arguments: /media/Datas3/home/Documents/devs/NotepadNext/build/src/NotepadNext
Config File: /home/cyril/.config/NotepadNext/NotepadNext.ini

Additional Details

Related: #951 mentions that escaped characters work in extended mode for the
replacement string; only the search string is affected here.

Dominant language
C++
Stars
14.7k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dail8859/NotepadNext

All issues in dail8859/NotepadNext

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.