1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[clipboard] Moved function to session, to easier testing.

This commit is contained in:
Witold Filipczyk 2022-06-05 15:21:00 +02:00
parent cd0ec0faa9
commit 0db5bb7764
3 changed files with 10 additions and 1 deletions

View File

@ -65,6 +65,7 @@
#include "main/select.h"
#include "osdep/osdep.h"
#include "osdep/signals.h"
#include "session/session.h"
#include "terminal/terminal.h"
#include "util/conv.h"
#include "util/file.h"
@ -443,7 +444,7 @@ void
set_clipboard_text(char *data)
{
#ifdef HAVE_ACCESS
char *f = get_opt_str("ui.clipboard_file", NULL);
char *f = get_ui_clipboard_file();
if (f && *f) {
char *filename = expand_tilde(f);

View File

@ -1665,3 +1665,9 @@ set_kbd_repeat_count(struct session *ses, int new_count)
return new_count;
}
char *
get_ui_clipboard_file(void)
{
return get_opt_str("ui.clipboard_file", NULL);
}

View File

@ -340,6 +340,8 @@ int eat_kbd_repeat_count(struct session *ses);
* highlighting and status bar. */
int set_kbd_repeat_count(struct session *ses, int new_count);
char *get_ui_clipboard_file(void);
#ifdef CONFIG_SCRIPTING
void maybe_pre_format_html(struct cache_entry *cached, struct session *ses);
#endif