Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

clare0901
Copy link

@clare0901 clare0901 commented Jun 17, 2025

Fixes #16236

This PR implements a visual progress update while cutting bookmarked lines, particularly useful for large files. The following improvements were made:

  • Displays progress in the status bar every 5000 lines (can be tuned).
  • Keeps the UI responsive by processing pending messages.
  • Adds a cancel button through a dialog, allowing users to stop the operation midway.
  • Ensures clipboard is updated only with the lines processed before cancellation.

Notes:

  • The progress status is sent via NPPM_SETSTATUSBAR.
  • A modeless dialog with a Cancel button is added using CreateDialogParam.
  • A _cancelCutOperation flag is added to gracefully exit the loop when cancellation is requested by the user.
  • The code uses PeekMessage to maintain UI responsiveness, thus eliminating the screen freeze

Tested on:

  • Windows 10, Visual Studio 2022.
  • Files with ~90,000 bookmarked lines.

Testing Snippets.docx

@chcg chcg added the enhancement Proposed enhancements of existing features label Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Proposed enhancements of existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show progress of processing (for large files)

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.