Skip to content

Expose current file upload as a shortcut-mappable command#404

Open
thedalbee wants to merge 2 commits into
ashkulz:masterfrom
thedalbee:codex/upload-current-file-command-174
Open

Expose current file upload as a shortcut-mappable command#404
thedalbee wants to merge 2 commits into
ashkulz:masterfrom
thedalbee:codex/upload-current-file-command-174

Conversation

@thedalbee
Copy link
Copy Markdown

Fixes #174

Summary

Adds a shortcut-mappable upload command for the active Notepad++ file:

  • exposes Upload Current File in the Notepad++ plugin command list
  • preserves the existing Show/Focus/About command positions, appending the new command after About
  • extracts the existing toolbar/context-menu current-file upload behavior into FTPWindow::UploadCurrentFile()
  • keeps toolbar upload behavior unchanged, including Ctrl+Upload prompting for another local file
  • documents assigning the command through Notepad++ Shortcut Mapper

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 summary
  • 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 live FTP upload flow. I do not have a Windows/Notepad++ plugin runtime in this environment.

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.

dalbee 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.
@thedalbee
Copy link
Copy Markdown
Author

Follow-up after review: I noticed the extracted helper had accidentally depended on cached toolbar state for the current-file path. I pushed c87960e so the helper resolves the current Notepad++ path at invocation time, matching the previous toolbar/context-menu behavior while still exposing the shortcut-mappable command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty] Shortcut for upload files

1 participant