Because compatibility. All the existing text programs assume the physical tele-typewriter emulator. There have been many attempts to modernize the essential parts of the text console experience and do away with the inessential parts, but they always fail to catch on because people expect to be able to run programs like 'top' and 'ls -la' and 'pstree', which expect to format their output on a handy fixed width character grid. And you can't easily patch mouse selection into the existing system because there is too much seperation between the terminal and the content - the terminal is not aware of the intended text formatting, and the program is not aware of where you clicked. Fixing this would also require patching the world.
If you want to live in the future, you can't use programs written in the past. There are many fine GUI text editors: leafpad is your basic bare-bones notepad-alike, and for my money Kate is the best 'notepad++' mega-text-editor that's still light enough to start instantly.
> And you can't easily patch mouse selection into the existing system because there is too much seperation between the terminal and the content - the terminal is not aware of the intended text formatting, and the program is not aware of where you clicked.
I'm sorry, but this is plain wrong.
gpm [0] supplies a mouse server for the console, and has been around for a very long time (the oldest release I could find was 1995). SSH, nano, vim and more all understand the events driven by it. This should even work under a raw tty, rather than a terminal emulator, in any shell, from ash to zsh.
The terminal absolutely understands the mouse, you just need to enable the bridge that lets it all work.
Does GPM let you move the insertion point in nano or vim? It didn't when I last used it 12 or 13 years ago. All it let me do was select a region of text from the screen plus the scrollback buffer of the linux console. Then I could choose to copy that region. And IIRC, the copy had a newline wherever the text being displayed had a newline and where one line of the linux console ended and the next line began, so if what I was copying had any lines that ran longer than the screen width, I'd have to manually remove the second type of newlines after pasting.
And when the user selected text using GPM, the program (e.g., nano) never learned of it: it was local to GPM and the linux console.
The man page you linked states, "The selection mechanism is disabled if the controlling virtual console is placed in graphics mode, for example when running X11, and is re-enabled when text mode is resumed," (then goes on the describe how sometimes it does not get re-enabled because of a bug).
Can a modern PC even be put into text mode anymore? (Honest question: I do not know.)
Have you ever gotten GPM to work with X11 or Wayland?
> Does GPM let you move the insertion point in nano or vim?
If you enable mouse support. (set mouse for nano and set mouse=a in vim).
> Have you ever gotten GPM to work with X11 or Wayland?
That'd be rather... Pointless. X11 and Wayland already allow the mouse to work without GPM. Just enable the mouse in nano, vim or whatever, and it'll work.
Whatever terminal-emulation app (e.g., Gnome Terminal) you are using will allow you to select text in the app's window, but nano or vim will never know about it. I.e., the user's mouse gestures are never transmitted to the program (e.g., nano) on the other side of the pseudo-TTY (PTY).
So for example, the user cannot use the mouse to move the insertion point in nano.
Leafpad hasn't been maintained in the last decade or so, is buggy and based on GTK 2.
Please don't recommend it to anyone. Gedit is much more sensible as a replacement.
If you want to live in the future, you can't use programs written in the past. There are many fine GUI text editors: leafpad is your basic bare-bones notepad-alike, and for my money Kate is the best 'notepad++' mega-text-editor that's still light enough to start instantly.