This behavior is easy to write a script for, and as scripts can be configured to run from the editor’s right-click menu, a script solution seems to “check all the boxes”.
Here’s UrlLinkSelectOrPasteover.py:
# -*- coding: utf-8 -*- from __future__ import print_function ######################################### # # UrlLinkSelectOrPasteover (ULSOP) # ######################################### # references: # https://community.notepad-plus-plus.org/topic/24893/click-link-and-paste-new-link # https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14114 # for newbie info on PythonScripts, see https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript #------------------------------------------------------------------------------- from Npp import * #------------------------------------------------------------------------------- class ULSOP(object): def __init__(self): URL_INDIC = 8 curr_pos = editor.getCurrentPos() pasting = False if editor.indicatorValueAt(URL_INDIC, curr_pos): editor.setSel(editor.indicatorStart(URL_INDIC, curr_pos), editor.indicatorEnd(URL_INDIC, curr_pos)) if pasting: editor.paste() #------------------------------------------------------------------------------- if __name__ == '__main__': ULSOP()If you want pasting behavior rather than selection behavior, change pasting = False to pasting = True. If you want both behaviors (in, say, two context menu entries), then you’ll need a second script (virtually a copy of the first).