Skip to content

[BUG] Wrong opened directory #16465

@guy038

Description

@guy038

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

Hello @donho and developers,

I've discovered a slight annoyance that only manifests itself when N++ is first opened, and if the first action is to open the Preferences dialog by mistake !

This is also a simplification of the case described in the post below :

https://community.notepad-plus-plus.org/post/101195

Steps To Reproduce

First, I assume that you previously chose the option Follow current document in Settings > Preferences > Default Directory > Default Open/Save file Directory ( IMPORTANT ).

Secondly, I just tested portable versions of Notepad++, but I guess it should be similar with the Installer !

So :

  • Open your portable N++ release which probably contains several tabs, from files located in different folders, too.

  • Move to any tab which is NOT in the Notepad++ Intallation Folder ( Thus, != '$(NPP_DIRECTORY)" )

  • Open the Settings > Preferences... dialog and, immediately, close it.

  • Hit the Ctrl + O shortcut or click on the Open icon of the toolbar.

Current Behavior

=> It wrongly opens the N++ Installation Folder !

Expected Behavior

It should open the folder of the active tab,, which is NOT located in the N++ Install Folder .

Luckily, as soon as you switch to an other tab or close and restore this tab, the bug never occurs anymore !

Remark : this tiny problem exists since many versions : I was able to reproduce it with the last Win XP version, the release v7.9.2 !!

Note also that the two other options Style Configurator... and Shortcut Mapper, of the Settings dialog, do NOT produce this bug, either !

Debug Information

Notepad++ v8.8   (64-bit)
Build time : Apr 22 2025 - 18:20:44
Scintilla/Lexilla included : 5.5.6/5.4.4
Boost Regex included : 1_85
Path : D:\880_x64\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : OFF
Placeholders : OFF
Scintilla Rendering Mode : SC_TECHNOLOGY_DEFAULT (0)
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.5737
Current ANSI codepage : 1252
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions