Bo Peng wrote:

> Hi,
> 
> It is strange to me that lyx can not paste (middle-button) its own
> selection, since it can paste selection from other application, and
> other application can paste lyx' selection. I traced a little bit in
> text3.C, and find that the selection will become empty if a single
> click is executed. That is to say, a click would be considered as an
> empty selection that removes previous selection. The consequence is
> that when a user locate another place with a mouse click, then use
> middle button to paste, there is nothing to paste.
> 
> What do you think about this? I think the better behavior is that
> empty selection should be silently ignored so paste would paste
> previous meaningful text. I could not locate where and how to change
> the current behavior though. Any help is appreciated.

I think the suggested behaviour would probably mean that we do not unset the
X selection when the text is not highlighted anymore. At least this seems
to be what KDE programs do. xterm for example is still able to paste the
last selection, but unsets the X selection if the text is not highlighted,
so you are not able to paste this in other programs.

Actually, after thinking about this a bit more I came to the conclusion that
the current behaviour in LyX is currect, and KDE is playing too many
tricks.

The selection is a very simple thing, and the logic "highlighted text" ==
"selection set" is easy to understand. If you want to copy and paste, use
C-c and C-v. The selection is a powerful tool for exchanging plain tetx
between applications, but nothing more. Only limited applications like
xterm that do not have a real clipboard may need to do some tricks.


Georg

Reply via email to