mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
get_clipboard_text: Disable pasting from GNU Screen's clipboard.
This commit is contained in:
parent
3caec64c51
commit
763f03f146
4
NEWS
4
NEWS
@ -34,7 +34,6 @@ roughly in decreasing order of importance.
|
|||||||
- (enhancement) Reject invalid UTF-8 input from documents and
|
- (enhancement) Reject invalid UTF-8 input from documents and
|
||||||
terminals.
|
terminals.
|
||||||
* Changes in terminal support
|
* Changes in terminal support
|
||||||
- (new feature) Support for pasting from GNU screen clipboard
|
|
||||||
- (enhancement) Make ELinks FreeBSD friendly. Defined keys used on
|
- (enhancement) Make ELinks FreeBSD friendly. Defined keys used on
|
||||||
FreeBSD console
|
FreeBSD console
|
||||||
- (enhancement) Mouse wheel support on BSD via moused -z 4
|
- (enhancement) Mouse wheel support on BSD via moused -z 4
|
||||||
@ -72,7 +71,7 @@ roughly in decreasing order of importance.
|
|||||||
- (enhancement 887) Save in cookie manager should save cookies even
|
- (enhancement 887) Save in cookie manager should save cookies even
|
||||||
if unmodified.
|
if unmodified.
|
||||||
* Changes in the user interface
|
* Changes in the user interface
|
||||||
- (new feature) Internal clipboard support
|
- (new feature 145) Internal clipboard support
|
||||||
- (enhancement) Place the cursor on the current listbox item, to
|
- (enhancement) Place the cursor on the current listbox item, to
|
||||||
help screen readers
|
help screen readers
|
||||||
- (enhancement) Localization updates
|
- (enhancement) Localization updates
|
||||||
@ -270,6 +269,7 @@ have already been considered.
|
|||||||
- (new feature) Let plain text change colors with ESC [ 31 m or
|
- (new feature) Let plain text change colors with ESC [ 31 m or
|
||||||
similar control sequences, reverted in
|
similar control sequences, reverted in
|
||||||
2a6125e3d0407b588eb286d4d0ff5c98c23ebda9
|
2a6125e3d0407b588eb286d4d0ff5c98c23ebda9
|
||||||
|
- (enhancement) Support for pasting from GNU screen clipboard
|
||||||
* Unimportant changes:
|
* Unimportant changes:
|
||||||
- (enhancement) If select fails, save its errno.
|
- (enhancement) If select fails, save its errno.
|
||||||
|
|
||||||
|
@ -349,6 +349,26 @@ static unsigned char *clipboard;
|
|||||||
unsigned char *
|
unsigned char *
|
||||||
get_clipboard_text(void)
|
get_clipboard_text(void)
|
||||||
{
|
{
|
||||||
|
/* The following support for GNU Screen's clipboard is
|
||||||
|
* disabled for two reasons:
|
||||||
|
*
|
||||||
|
* 1. It does not actually return the string from that
|
||||||
|
* clipboard, but rather causes the clipboard contents to
|
||||||
|
* appear in stdin. get_clipboard_text is normally called
|
||||||
|
* because the user pressed a Paste key in an input field,
|
||||||
|
* so the characters end up being inserted in that field;
|
||||||
|
* but if there are newlines in the clipboard, then the
|
||||||
|
* field may lose focus, in which case the remaining
|
||||||
|
* characters may trigger arbitrary actions in ELinks.
|
||||||
|
*
|
||||||
|
* 2. It pastes from both GNU Screen's clipboard and the ELinks
|
||||||
|
* internal clipboard. Because set_clipboard_text also sets
|
||||||
|
* them both, the same text would typically get pasted twice.
|
||||||
|
*
|
||||||
|
* Users can instead use the GNU Screen key bindings to run the
|
||||||
|
* paste command. This method still suffers from problem 1 but
|
||||||
|
* any user of GNU Screen should know that already. */
|
||||||
|
#if 0
|
||||||
/* GNU Screen's clipboard */
|
/* GNU Screen's clipboard */
|
||||||
if (is_gnuscreen()) {
|
if (is_gnuscreen()) {
|
||||||
struct string str;
|
struct string str;
|
||||||
@ -359,6 +379,7 @@ get_clipboard_text(void)
|
|||||||
if (str.length) exe(str.source);
|
if (str.length) exe(str.source);
|
||||||
if (str.source) done_string(&str);
|
if (str.source) done_string(&str);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return stracpy(empty_string_or_(clipboard));
|
return stracpy(empty_string_or_(clipboard));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user