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

Space to Tab (all) inserts tabs into quoted strings

Open
#13,317 2 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

If you have a string with a lot of space in C file, the I have noticed that inside a quoted string, spaces are replaced by tab chars.

I don't remember this happening on earlier versions.
I would normally expect the tab to space to ignore quoted strings in c/c++ since the string itself has no origin.
Note: I have put the whitespace as text since the preview has whitespace suppression on.

Original line

[tab][tab]printf("Up time[space][space][space][space]: %d days, ", run);

Replaced line

[tab][tab]printf("Up time[tab][space][space][space]: %d days, ", run);

Debug Information

Notepad++ v8.5 (64-bit)
Build time : Mar 6 2023 - 02:18:13
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "C:\Users\...\freight.txt"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.2673
Current ANSI codepage : 1252
Plugins :
DoxyIt (0.4.5)
DSpellCheck (1.4.24)
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)
NPPJSONViewer (2.0.4)

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 Space to Tab (all) command in a C or C++ file containing a quoted string with consecutive spaces. Trace the command's whitespace-conversion entry point and determine how quoted strings are handled. Done means spaces inside quoted strings remain unchanged while eligible whitespace outside them is converted, with a regression test if the test suite supports this command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
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.