mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Internal clipboard support
This commit is contained in:
parent
173e68ccfa
commit
f18de1d3f3
@ -344,11 +344,11 @@ exe(unsigned char *path)
|
||||
|
||||
#endif
|
||||
|
||||
unsigned char *
|
||||
get_clipboard_text(void) /* !!! FIXME */
|
||||
{
|
||||
unsigned char *ret;
|
||||
static unsigned char *clipboard;
|
||||
|
||||
unsigned char *
|
||||
get_clipboard_text(void)
|
||||
{
|
||||
/* GNU Screen's clipboard */
|
||||
if (is_gnuscreen()) {
|
||||
struct string str;
|
||||
@ -360,9 +360,7 @@ get_clipboard_text(void) /* !!! FIXME */
|
||||
if (str.source) done_string(&str);
|
||||
}
|
||||
|
||||
ret = mem_alloc(1);
|
||||
if (ret) ret[0] = 0;
|
||||
return ret;
|
||||
return stracpy(clipboard ? clipboard : "");
|
||||
}
|
||||
|
||||
void
|
||||
@ -381,7 +379,8 @@ set_clipboard_text(unsigned char *data)
|
||||
if (str.source) done_string(&str);
|
||||
}
|
||||
|
||||
/* TODO: internal clipboard */
|
||||
if (clipboard) mem_free(clipboard);
|
||||
clipboard = stracpy(data);
|
||||
}
|
||||
|
||||
/* Set xterm-like term window's title. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user