{"action":"opened","issue":{"url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/7663","repository_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus","labels_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/7663/labels{/name}","comments_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/7663/comments","events_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/7663/events","html_url":"https://github.com/notepad-plus-plus/notepad-plus-plus/issues/7663","id":528148640,"node_id":"MDU6SXNzdWU1MjgxNDg2NDA=","number":7663,"title":"\"Purge for each search\" option for \"Mark All\" action should respect \"In selection\" option","user":{"login":"sasumner","id":30118311,"node_id":"MDQ6VXNlcjMwMTE4MzEx","avatar_url":"https://avatars0.githubusercontent.com/u/30118311?v=4","gravatar_id":"","url":"https://api.github.com/users/sasumner","html_url":"https://github.com/sasumner","followers_url":"https://api.github.com/users/sasumner/followers","following_url":"https://api.github.com/users/sasumner/following{/other_user}","gists_url":"https://api.github.com/users/sasumner/gists{/gist_id}","starred_url":"https://api.github.com/users/sasumner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasumner/subscriptions","organizations_url":"https://api.github.com/users/sasumner/orgs","repos_url":"https://api.github.com/users/sasumner/repos","events_url":"https://api.github.com/users/sasumner/events{/privacy}","received_events_url":"https://api.github.com/users/sasumner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-11-25T15:09:54Z","updated_at":"2019-11-25T15:09:54Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description of the Issue\r\n\r\nAs hinted at in a comment to #6271...\r\n\r\nThe `Purge for each search` option, when selected, will cause all marks in a document to be removed when a new `Mark All` operation is performed.  Normally this is the desired behavior.  However, if the `In Selection` option is also chosen, the marking operation should respect that and only purge the marks in the selection before marking the newly-specified text (also limited to the current selection).\r\n\r\n### Steps to Reproduce the Issue\r\n\r\n1. Copy the following text into a new Notepad++ tab:\r\n\r\n```\r\nJack and Jill\r\nWent up the hill\r\nTo fetch a pail of water\r\nJack fell down\r\nAnd broke his crown,\r\nAnd Jill came tumbling after.\r\n\r\nUp Jack got\r\nAnd home did trot,\r\nAs fast as he could caper;\r\nAnd went to bed\r\nAnd plastered his head\r\nWith vinegar and brown paper.\r\n\r\nWhen Jill came in\r\nHow she did grin\r\nTo see Jack's paper plaster;\r\nMother vexed\r\nDid whip her next\r\nFor causing Jack's disaster.\r\n\r\n```\r\n2. Invoke the Mark dialog.\r\n3. Untick all checkboxes; tick Wrap around checkbox.\r\n4. Put `Jack` in Find what box.\r\n5. Press Mark All button.  Note the marking that occurs throughout the document.\r\n6. Select the entire first \"paragraph\" aka the first 6 lines.\r\n7. Tick the `In selection` checkbox in the Mark dialog.\r\n8. Tick the `Purge for each search` checkbox in the Mark dialog.\r\n9. Put `Jill` in Find what box.\r\n10. Press the `Mark All` button.\r\n\r\n### Expected Behavior\r\nBecause `In selection` and `Purge for each search` are ticked, I expect the `Mark All` button to only clear marking in the selected text before running the new mark operation.\r\n\r\nThis should be what it looks like after Step 10:\r\n\r\n![image](https://user-images.githubusercontent.com/30118311/69551344-8923db80-0f6a-11ea-8358-3503b0c04cae.png)\r\n\r\n### Actual Behavior\r\nAll marking in the document is cleared before running the new marking operation.\r\n\r\nThis is what it currently looks like after Step 10:\r\n\r\n![image](https://user-images.githubusercontent.com/30118311/69551167-419d4f80-0f6a-11ea-98fb-e5fa23448028.png)\r\n\r\n### Debug Information\r\nNotepad++ v7.8   (32-bit)\r\nBuild time : Oct  7 2019 - 00:58:16\r\nPath : C:\\............\\npp.7.8.bin\\notepad++.exe\r\nAdmin mode : OFF\r\nLocal Conf mode : ON\r\nOS Name : Windows 10 Enterprise (64-bit) \r\nOS Version : 1709\r\nOS Build : 16299.1451\r\nPlugins : ColumnTools.dll Explorer.dll LocationNavigate.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll PythonScript.dll \r\n\r\n### Other Notes:\r\n\r\n(Red)marking shown in the above.  Bookmarking behavior, if enabled via the `Bookmark line` option, would be treated similarly.\r\n\r\n### Other Screenshots\r\n\r\nAfter Step 5:\r\n\r\n![image](https://user-images.githubusercontent.com/30118311/69551015-000ca480-0f6a-11ea-8609-fbf9b559ad8d.png)\r\n\r\nAfter Step 6:\r\n\r\n![image](https://user-images.githubusercontent.com/30118311/69551648-08191400-0f6b-11ea-8629-23dfd8445032.png)\r\n"}}
{"actor":{"display_login":"sasumner"}}