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

Multi line editing broken with right-to-left text

Open
#10,099 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of the Issue

When switching to right-to-left text (CTRL + ALT + R), the block selection or multi line editing somehow still uses the left-to-right coordinates. As a result, if I select something and hit delete, Notepat++ actually deletes something different than what I selected.

The reason I (want to) use this mode is to multi-line-edit data that is right-aligned (as in the very simple example below).

Steps to Reproduce the Issue
  1. Copy the following simple example into Notepad++:
abcDe
abcDe
abcDe
bcDe
  1. Change to right-to-left mode using CTRL + ALT + R
  2. Select the D in all lines using ALT + SHIFT + Left mouse
  3. Hit DELETE.
Expected Behavior

Since I selected all the Ds I expected the Ds to disappear like this:

abce
abce
abce
bce
Actual Behavior

This is what I actually get:

acDe
acDe
acDe
bDe
Debug Information

Tested with both v7.9.5 and v8.1:

Notepad++ v7.9.5   (64-bit)
Build time : Mar 21 2021 - 02:13:17
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise LTSC 2019 (64-bit) 
OS Version : 1809
OS Build : 17763.1999
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
Notepad++ v8.1   (64-bit)
Build time : Jun 17 2021 - 01:56:07
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise LTSC 2019 (64-bit) 
OS Version : 1809
OS Build : 17763.1999
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.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

Start by reproducing the issue with the provided four-line example, RTL mode, block selection, and Delete action. Trace the multi-line selection and deletion handling for right-to-left text; done means deleting the selected D characters produces the expected four-line output without affecting adjacent characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.