Skip to content

Insert Date/Time problems #10567

@pryrt

Description

@pryrt

There are bugs related to the new Edit > Insert > Date Time ... trio of commands in both v8.1.4 and v8.1.5; it would be nice to fix them before the permanent release of v8.1.5:

  1. They are not available in shortcut mapper, so you cannot assign keyboard shortcuts to them. Even if I try to manually assign them using <Shortcut id="42084" Ctrl="no" Alt="no" Shift="no" Key="116" /> (for 42084, 42085, or 42086), they do not respond to that keyboard shortcut

  2. They are not macro recordable. If you Macro > Start Recording, Edit > Insert > Date Time (short), Macro > Stop Recording, Macro > Save Current Recorded Macro to AssignableDateTimeShort, it records the macro

        <Macro name="AssignableDateTimeShort" Ctrl="no" Alt="no" Shift="no" Key="116">
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="" />
            <Action type="1" message="2001" wParam="18" lParam="0" sParam="9" />
        </Macro>

The type="1" messages are scintilla commands, so it didn't actually record the insert date/time command. And if you play it back (even after a reload), it does some random text, such as 68ce5f0f-8432-4e01-ad82-29bf7b5bf32e-image.png . Looking up those scintilla commands, 2170 is ReplSel() and 2001 is AddText(), with wparam=18 saying insert 18 characters but the sParam="9" having just one character, so then it grabs the next 17 characters from some random memory location.

Notepad++ v8.1.5   (64-bit)
Build time : Sep 18 2021 - 14:39:14
Path : C:\usr\local\apps\npp\npp.8.1.5-RC1.portable.x64\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Home (64-bit) 
OS Version : 2009
OS Build : 19043.1237
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll 

(First reported in this other thread. This issue is a duplication of my post in the v8.1.5-RC topic, per @mere-human's request that I put it here for tracking.)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions