notepad-plus-plus / notepad-plus-plus

Notepad++ official repository
https://notepad-plus-plus.org/
Other
23.17k stars 4.63k forks source link

[BUG] Clear All Marks Has Different Behavior #15073

Open sambo22 opened 7 months ago

sambo22 commented 7 months ago

Is there an existing issue for this?

Description of the Issue

Using Search->Bookmarks->Clear All Bookmarks only clears the dot indicating a mark on a line. Using Search Window->Mark->Clear All Marks clears the dot and de-highlights matching text

Steps To Reproduce

  1. Ctrl+F->Mark->Search for some existing string and click Mark All->Close Window
  2. Go to Search->Bookmakrs->Clear All Bookmarks. Note the all instances of the searched string are still highlighted.
  3. Reopen search window with Ctrl+F, go to Mark tab and then use Clear All Marks to remove highlighted text.

Current Behavior

There are two methods to clear all bookmarks. Each are named slightly different, and one is missing a step that the other executes.

Expected Behavior

The highlighted text should either be cleared when using Search->Bookmarks->Clear All Bookmarks or when the Search window is closed.

Debug Information

Notepad++ v8.6.5   (64-bit)
Build time : Mar 29 2024 - 17:04:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "C:\...\DAQI\CAN-Test\ClosestTargetOnlyHunterBackpack-00\PCANView 30s.trc"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Enterprise (64-bit
OS Version : 22H2
OS Build : 19045.4291
Current ANSI codepage : 1252
Plugins : 
    HexEditor (0.9.12)
    LuaScript (0.12)
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

alankilborn commented 7 months ago

The behavior is as intended. This issue may be closed.

EDIT: BTW, if you want to clear "red marked" text without clearing bookmarks at the same time, uncheckmark Bookmark Line in the Mark dialog, before pressing the Clear All Marks pushbutton.

ArkadiuszMichalski commented 4 months ago

@alankilborn The behavior is as intended. This issue may be closed.

I think so too, these are two separate mechanisms. But why we can't remove all find marks from menu or context menu?

image

We can jump up/down and copy but not clear.

alankilborn commented 4 months ago

But why we can't remove all find marks from menu

That's a reasonable request.

alankilborn commented 4 months ago

@ArkadiuszMichalski

Between Clear 5th Style and Clear All Styles, there should be Clear Mark Style.

Currently Clear All Styles does not clear redmarked text. If Clear Mark Style is added here, then it seems like Clear All Styles should be changed to clear redmarked text as well (otherwise user is confused that not "all" were cleared). What do you think?

ArkadiuszMichalski commented 4 months ago

@alankilborn

Between Clear 5th Style and Clear All Styles, there should be Clear Mark Style.

It depends what All Styles should mean, only 1-5 Styles or 1-5 Styles + Find Mark Style . For copy text we have:

image

so it's mean 1-5 Styles. If entry for clear Find Mark Style will be added, it would be good to make all consistent (to not generate another confusion).

On the other hand, this could be done with separate commands:

Clear 1st-5th Styles
Clear Find Mark Style
Clear All Styles

But these are just random thoughts, without accepting possible changes, there is no point to starting work.

alankilborn commented 4 months ago

@ArkadiuszMichalski

The ordering of the menu items for Copy Styled Text makes it (somewhat!) clear to the user that All Styles will not act upon Find Mark Style text. But... it could be better with changed text of Numbered Styles.

Then... Clear Style menu could be changed to be same as Copy Styled Text menu.

In both cases, if user truly wanted to act upon all 6 styles, he could make a macro of two commands, or a true All Styles menu item could be added.

If @donho cares enough about this, we probably should open a new issue, because recent comments are "off base" to what @sambo22 originally reported.