notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

context menu file open order wrong

Open
#13,529 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

The order that files are opened in npp tabs when opening multiple files simultaneously from "edit with notepad++" context menu is misordered.

The clicked on file used to be the first file, now it is the last.

Steps to Reproduce the Issue
  1. install npp 8.5.1 all default settings
  2. make three files in a folder, e.g. a, b, c
  3. select all files
  4. Right click on a and select "edit with notepad++"
  5. observe the order that the three files are in tabs in npp
  6. close all tabs
  7. repeat step 3-6 but right click on b instead
  8. repeat again with c
  9. install npp 8.5.2 all default settings
  10. restart computer
  11. repeat steps 3-8
Expected Behavior

here is what happens up to 8.5.1

Left side is the file you right clicked on

Right side is the order the files are opened in npp tabs, the selected tab is in square brackets

a -> a b [c]
b -> b c [a]
c -> c a [b]

as you can see, the files are opened in the order of the right clicked on file first, then the next file, etc until it loops around and continues one after another. this is the expected behaviour and consistent with how windows deals with multiple selected files.

Actual Behavior

here's what happens on 8.5.2

a -> b c [a]
b -> c a [b]
c -> a b [c]

instead of the right clicked on file being the first tab, it is now the last. they are still opened in the same order, but it is now starting with the file that is the next file after the right clicked on file, rather than the right clicked on file itself.

Debug Information

Windows 10 22h2 x64
npp 8.5.2 x64 default settings

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the multi-file context-menu behavior using the a, b, and c file sequence on Notepad++ 8.5.1 and 8.5.2 with default settings. Trace the context-menu handling for opening multiple selected files, then verify that the clicked file is the first tab and the selected tab matches the reported expected order.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.