Expose current file upload as a shortcut-mappable command#404
Open
thedalbee wants to merge 2 commits into
Open
Expose current file upload as a shortcut-mappable command#404thedalbee wants to merge 2 commits into
thedalbee wants to merge 2 commits into
Conversation
added 2 commits
May 13, 2026 11:13
The bounty asks for a shortcut-driven upload path. NppFTP already had the correct current-file upload behavior behind the toolbar and context-menu handler, so this extracts that path into FTPWindow::UploadCurrentFile and exposes it through the Notepad++ plugin command list for Shortcut Mapper assignment. Constraint: Windows/Notepad++ plugin behavior cannot be runtime-tested from this macOS environment. Rejected: Add a hard-coded default shortcut | Notepad++ lets users map plugin commands, and default shortcuts risk colliding with editor or user mappings. Rejected: Implement arbitrary file-list upload | the issue discussion identifies active-current-file upload as the useful bounded shortcut path. Confidence: medium Scope-risk: narrow Directive: Preserve the existing toolbar upload behavior; shortcut command should call the same upload path. Tested: repo_vet.py static safety scan Tested: git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check Not-tested: Windows Notepad++ build/runtime and actual FTP upload flow.
The shared upload helper must not narrow the existing tree-menu behavior. The previous code resolved the current Notepad++ path at invocation time, so the extracted helper now does the same instead of depending on the cached toolbar-enabled state. Constraint: Follow-up came from code review before runtime validation was available. Confidence: medium Scope-risk: narrow Tested: git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check Not-tested: Windows Notepad++ build/runtime and actual FTP upload flow.
Author
|
Follow-up after review: I noticed the extracted helper had accidentally depended on cached toolbar state for the current-file path. I pushed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #174
Summary
Adds a shortcut-mappable upload command for the active Notepad++ file:
FTPWindow::UploadCurrentFile()This implements the bounded path discussed in the issue comments: upload the currently active file to the selected/current remote folder by shortcut.
Verification
python3 /Users/dalbee/ws/bounty-work/tools/repo_vet.py /Users/dalbee/ws/bounty-work/NppFTP --format summarygit -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --checkNot tested
Safety note
I kept this to static review and a small C++ refactor. I did not run project build/install scripts locally after the repository vetting pass flagged install/workflow surfaces that should be treated cautiously.