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

Editor reset file language after rename

Open
#10,784 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

Don't change selected syntax after rename file when file don't have extension (or file extension don't have predefined syntax).

Steps to Reproduce the Issue
  1. open file foo in editor
  2. select PHP syntax
  3. rename file to bar (by File/Rename)
Expected Behavior

syntax: PHP

Actual Behavior

syntax: default

Debug Information

Notepad++ v8.1.9 (64-bit)
Build time : Oct 21 2021 - 23:37:53
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "Y:\etc\wsl.conf"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : E:\YandexDisk
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19044.1348
Current ANSI codepage : 1251
Plugins : ComparePlugin.dll JSMinNPP.dll mimeTools.dll NppExec.dll NppExport.dll NppMarkdownPanel.dll NppPluginOpenHost.dll XMLTools.dll zoomdisabler_x64.dll

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 issue in Notepad++ by opening an extensionless file, selecting PHP syntax, and using File/Rename. Trace the rename handling for files without a predefined extension. Done means the selected PHP syntax remains active after renaming the file to another extensionless name.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.