Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with clearing marking (red background) in selected text #8150

Closed
sasumner opened this issue Apr 21, 2020 · 2 comments
Closed

Bug with clearing marking (red background) in selected text #8150

sasumner opened this issue Apr 21, 2020 · 2 comments
Labels

Comments

@sasumner
Copy link
Contributor

Description of the Issue

When a selection is active containing text that has been previously "Mark'd" with a red background, and it is desired to clear the red background ONLY WITHIN THAT SELECTION, the red background is cleared at higher document positions than is covered by the selection (i.e., OUTSIDE the active selection).

Steps to Reproduce the Issue

  1. Create a new tab with the following text:
Jack and Jill
Went up the hill
To fetch a pail of water
Jack fell down
And broke his crown,
And Jill came tumbling after.

2a) Do a Mark All operation with the following settings:

image

2b) Observe:

image

3a) Make the following selection of text (selection covers lines 3 and 4) and then do a Clear all marks operation with the following settings:

image

3b) Observe "Actual Behavior"; too much marking is removed (see line 5 where the bookmark remains but the red background has been eliminated):

image

3c) Realize that "Desired Behavior" is that the red background be removed from only lines 3 and 4, and NOT LINE 5 since line 5 was not in the active selection when Clear all marks was invoked.

Debug Information

Notepad++ v7.8.4 (32-bit)
Build time : Jan 29 2020 - 01:33:47
Path : C:...........\npp.7.8.4.bin\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1039
Plugins : BetterMultiSelection.dll DSpellCheck.dll linefilter2.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll NppMenuSearch.dll NppToolBucket.dll PythonScript.dll qkNppReverseLines.dll XMLTools.dll

@donho
Copy link
Member

donho commented Apr 29, 2020

Tested on the following content:

Section un.ukrainian
Delete "$INSTDIR\localization\ukrainian.xml"
SectionEnd
Section un.urdu
Delete "$INSTDIR\localization\urdu.xml"
SectionEnd
Section un.uyghur
Delete "$INSTDIR\localization\uyghur.xml"
SectionEnd
Section un.uzbek
Delete "$INSTDIR\localization\uzbek.xml"
SectionEnd
Section un.uzbekCyrillic
Delete "$INSTDIR\localization\uzbekCyrillic.xml"
SectionEnd
Section un.vietnamese
Delete "$INSTDIR\localization\vietnamese.xml"
SectionEnd

And I found the following bug:

  1. After clicking "Mark All" with the "Section":
    image

  2. Select 2 lines:
    image

  3. Check In Selection then click Clear All, the markers are removed, but not the highlighting:
    image

@sasumner
Copy link
Contributor Author

@donho, YES! That is another way to reproduce the bug.
I get exactly your results on your data when reproducing the bug in final released version 7.8.6.

@donho donho closed this as completed in 4be846e Apr 29, 2020
alef162 pushed a commit to alef162/notepad-plus-plus that referenced this issue Oct 11, 2020
Fix bug of Mark clearing nothing or too much when clearing marking in selected text.

Fix notepad-plus-plus#8150, close notepad-plus-plus#8151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants