Alan Mackenzie
2023-10-04 18:20:01 UTC
Hello, Gentoo.
In the GPM mouse utility in a tty, one can use a double click to select
a word (and by holding the button down and moving the mouse, select a
sequence of words).
Similarly, with a triple click, one can select a line, or a sequence of
lines. This is all very fine, but GPM adds a CR after each line in the
sequnce, INCLUDING THE LAST ONE. This makes it less useful for, say,
copying a shell script command from and editor onto a command line.
Because typically, you'd want to edit the command before executing it,
but with GPM's mechanism, the CR on the end immediately executes it, not
giving you a chance to edit it.
A solution to this problem is not to append the CR to the last line in a
sequence of lines selected by GPM. This means patching the kernel. To
apply the patch, first get the attached patch into the kernel's
directory, and do something like:
# patch -p1 < 6.1.8-TRIPLE.20231004.diff
, then rebuild the kernel. Install this kernel into your boot manager,
and voilĂ - the problem is solved. :-)
The usual disclaimer applies.
In the GPM mouse utility in a tty, one can use a double click to select
a word (and by holding the button down and moving the mouse, select a
sequence of words).
Similarly, with a triple click, one can select a line, or a sequence of
lines. This is all very fine, but GPM adds a CR after each line in the
sequnce, INCLUDING THE LAST ONE. This makes it less useful for, say,
copying a shell script command from and editor onto a command line.
Because typically, you'd want to edit the command before executing it,
but with GPM's mechanism, the CR on the end immediately executes it, not
giving you a chance to edit it.
A solution to this problem is not to append the CR to the last line in a
sequence of lines selected by GPM. This means patching the kernel. To
apply the patch, first get the attached patch into the kernel's
directory, and do something like:
# patch -p1 < 6.1.8-TRIPLE.20231004.diff
, then rebuild the kernel. Install this kernel into your boot manager,
and voilĂ - the problem is solved. :-)
The usual disclaimer applies.
--
Alan Mackenzie (Nuremberg, Germany).
Alan Mackenzie (Nuremberg, Germany).