Skip to content

[BUG] "Copy Selected Line(s)" in Search-results sometimes has unexpected behavior #15803

@alankilborn

Description

@alankilborn

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

(Some would see this as a Feature Request; I see it as a Bug because unexpected behavior is obtained)


Sometimes I am sloppy with selecting text when using Copy Selected Lines, example:

image

My intent here is to put exactly this into the clipboard:

01 : The quick brown fox jumped over the lazy dogs.
01a : The quick brown dog jumped over the lazy foxes.

But after I execute Copy Selected Line(s) I obtain (in the clipboard):

01 : The quick brown fox jumped over the lazy dogs.
01a : The quick brown dog jumped over the lazy foxes.
02 : The quick brown fox jumped over the lazy dogs.
02a : The quick brown dog jumped over the lazy foxes.

Steps To Reproduce

  1. See Description above

Current Behavior

Less than obvious copying behavior.

Expected Behavior

Better behavior would be to only copy the "Line" data from lines touched by the stream selection the user has made.

Debug Information

Notepad++ v8.7   (64-bit)
Build time : Sep 17 2024 - 17:06:31
Path : C:\NotepadPlusPlus\Misc\_NoBackup\Releases\npp.8.7\npp.8.7.portable.x64\notepad++.exe
Command Line : -titleAdd="8.7 64-bit" -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Pro (64-bit)
OS Version : 23H2
OS Build : 22631.4317
Current ANSI codepage : 1252
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)
    PythonScript (3.0.16)

Anything else?

As a convenience functionality, if there is no selected text at time of right-click, and...

  • ... the line right-clicked is a Pathname line, copy the data for all Line text hierarchically below that Pathname (until either the following Pathname -- or Search line -- is encountered)
  • ... the line right-clicked is a Search line, copy the data for all Line text hierarchically below that Search line, for all Pathnames (until the following Search line is encountered)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions