Skip to content

Shortcut and menu command mismatched mapping for SCI_SELECTIONDUPLICATE and SCI_LINEDUPLICATE #5298

@UNIVAC-Colonel-Panic

Description

@UNIVAC-Colonel-Panic

Description of the Issue

  1. [bug to fix] Shortcut mapper links control-d to SCI_SELECTIONDUPLICATE but it should map to SCI_LINEDUPLICATE instead.
  2. [fyi] Menu command Edit->Line Operations->Duplicate Current Line does invoke SCI_LINEDUPLICATE, however the shortcut shown under Edit->Line Operations->Duplicate Current Line says control-d. Cosmetically this is OK.
  3. [bug to fix] SCI_SELECTIONDUPLICATE isn't available to be mapped to a customized button.

Steps to Reproduce the Issue

  1. Select multiple lines of text and do control-D. The multi-line selection gets duplicated.
  2. Select multiple lines of text and do Edit->Line Operations->Duplicate Current Line. The single line where the cursor is at gets duplicated.
  3. Go to Customize Toolbar toolbar plugin and under "Available toolbar buttons" double-click on "Duplicate Current Line."

Expected Behavior

I expected to press the custom button and have it emulate control-d (SCI_SELECTIONDUPLICATE), because control-d is what the GUI shows.

Actual Behavior

Pressing the custom button does SCI_LINEDUPLICATE.

Debug Information

Notepad++ v7.5.9 (32-bit)
Build time : Oct 14 2018 - 15:02:52
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll CodeAlignmentNpp.dll JSMinNPP.dll MarkdownViewerPlusPlus.dll NPPJSONViewer-win32.dll NppTextFX.dll PluginManager.dll Tidy2.dll _CustomizeToolbar.dll

screenshot 2019-02-05 at 10 08 41 pm

notepad-duplicate-current-line.zip

Screen recording is in attached file notepad-duplicate-current-line.zip which can be viewed with Screencastify on Chrome or using VLC media player.

Yes, I know how confusing this is. :D There are two bugs to fix.

You can see original discussion between me and Meta Chuh by going here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions