diff --git a/src/osdep/osdep.c b/src/osdep/osdep.c index 00b886cd9..e6e3d2d98 100644 --- a/src/osdep/osdep.c +++ b/src/osdep/osdep.c @@ -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); diff --git a/src/session/session.c b/src/session/session.c index b6e2f0bae..2de998258 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -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); +} diff --git a/src/session/session.h b/src/session/session.h index 21106c590..fe223995b 100644 --- a/src/session/session.h +++ b/src/session/session.h @@ -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