The cursor may stay in the middle of the line and there may be necessity to delete whatever stands from the right side of the cursor, but only till the end of current line. I don't know how this called properly and if there is such function in text editors, but if there is such, what shortcut usually used for this? I'm mostly interested in Notepad++.
Delete to end of line
In Notepad++ it is the following shortcut:
CtrlShiftDelete Delete to end of line
"Delete to end of line"
Windows, try this:
Hold SHIFT and hit End (selects the text) then Delete.
Linux, some editors mimick (i.e. 'works' the same as) windows editors, "native editors" (especially those running in shell/terminal) e.g. nano (pico) usually differ:
First press ENTER to split the line, creating a new line with the end part of the previous, then hold CTRL and hit k to kill the line.
I can highly recommend Emacs-keybindings. It takes some getting used to, but it's worth it: you never have to move your hands aways from the main keyboard block (letters and numbers) which is very ergonomical: Moving your hands back and forth plays a major role in carpal tunnel's.
Another upside is that a subset of Emacs keybindings are default in bash.
Emacs keybindings are available for example in Eclipse or Visual Studio Code via plugins.
Anyway, deleting the rest of the line in Emacs is: CTRL+k
It's easy and will work in most visual text editor. Just place the cursor from where text needs to be deleted, then press SHIFT+END, release pressed keys, then hit BACKSPACE. From the cursor to the end of line is deleted.
To erase the whole remaining part of document after cursor, press SHIFT+CTRL+END, release pressed keys, then hit BACKSPACE.
CudaText editor (free) has command named "Delete to line end". Hotkey is Ctrl+K. Hotkey is customizable of course.
In emacs (and clones/workalikes) it is ctrl-K (if at the very end of the line, this deletes the line end). emacs has its full extension language, with which you can write really anything and bind it to a shortcut, up to "modes" for working with different file types (languages) and running external commands.
In vi (and it's clones) "D" or "d$" (Omit the quotes! "Delete to end of line", also "delete" d + "move to end of line" $). vi has a very rich command set with base commands that can be composed, even calling out to operating system commands. Current vi clones (the most likely to be found today, on Linux original vi --closed source-- would be a no-no) sport their own elaborate extension language(s).