notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Search for string in very long line problem

Open
#7,780 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

verified
Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

#7455

Description of the Issue

The issue started here:
https://community.notepad-plus-plus.org/topic/18673/possible-bug-very-long-line

I searched for the start of the suspect line (find all current), it appeared in the results pane. Double clicking on the result would not move the main pane to that line. I think it is due to another very long line before the search results. I searched for the start of the prior line - double clicking on that result moved the main pane.
It did not matter if I had Word Wrap on or off.

This is annoying but not critical - I can scroll to the line.

Steps to Reproduce the Issue
  1. Open the file
  2. Search (find all current) for ["data"]
    It is at line 1758
  3. Double click on the search results; the main pane will not move to the line
Expected Behavior

The main pane will move to the selected line

Actual Behavior

"Nothing"

Debug Information

File attached.
You can search for the line prior (1757) - ["itemStrings"]; double click and the main pane will show that line.
This file is used by a World of Warcraft addon written in Lua. It is an output of a Lua data structure.

TradeSkillMaster.zip

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the issue in Notepad++ with the attached TradeSkillMaster.zip: search for "data" and double-click the result at line 1758, then compare it with line 1757. Trace the search-results navigation path for very long lines; done means the main pane moves to the selected result regardless of preceding line length.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.