Fix incorrect code

ref: 8ae049afbc (r135905629)

And also add new entries to tabContextMenu_example.xml
This commit is contained in:
Don Ho 2023-12-30 03:53:47 +01:00
parent d039eaa900
commit 4bde0d4b53
2 changed files with 50 additions and 47 deletions

View File

@ -561,7 +561,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
Sci_TextRangeFull tr;
tr.chrg.cpMin = posStart;
tr.chrg.cpMax = posEnd + 2;
if (tr.chrg.cpMax > static_cast<Sci_PositionCR>(docLen))
if (tr.chrg.cpMax > static_cast<Sci_Position>(docLen))
{
tr.chrg.cpMax = docLen;
}

View File

@ -48,6 +48,9 @@ https://npp-user-manual.org/docs/config-files/#the-context-menu-tabcontextmenu-x
<Item FolderName="Copy to Clipboard" MenuEntryName="Edit" MenuItemName="Copy Current Full File Path"/>
<Item FolderName="Copy to Clipboard" MenuEntryName="Edit" MenuItemName="Copy Current Filename"/>
<Item FolderName="Copy to Clipboard" MenuEntryName="Edit" MenuItemName="Copy Current Dir. Path"/>
<Item FolderName="Move Document" MenuEntryName="View" MenuItemName="Move to Start"/>
<Item FolderName="Move Document" MenuEntryName="View" MenuItemName="Move to End"/>
<Item FolderName="Move Document" id="0"/>
<Item FolderName="Move Document" MenuEntryName="View" MenuItemName="Move to Other View"/>
<Item FolderName="Move Document" MenuEntryName="View" MenuItemName="Clone to Other View"/>
<Item FolderName="Move Document" MenuEntryName="View" MenuItemName="Move to New Instance"/>