Mercurial > vim
changeset 17063:3147c7c2e86b v8.1.1531
patch 8.1.1531: clipboard type name is inconsistent
commit https://github.com/vim/vim/commit/0554fa478d27c611d23a814c987eb66f9daae6f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 14 21:36:54 2019 +0200
patch 8.1.1531: clipboard type name is inconsistent
Problem: Clipboard type name is inconsistent.
Solution: Rename VimClipboard to Clipboard_T.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Jun 2019 21:45:06 +0200 |
parents | ee88967a2cd5 |
children | 24519df8777a |
files | src/globals.h src/gui_gtk_x11.c src/gui_mac.c src/gui_x11.c src/ops.c src/os_qnx.c src/os_unix.c src/proto.h src/proto/gui_gtk_x11.pro src/proto/gui_mac.pro src/proto/gui_x11.pro src/proto/ops.pro src/proto/os_qnx.pro src/proto/os_unix.pro src/proto/ui.pro src/proto/winclip.pro src/ui.c src/version.c src/winclip.c |
diffstat | 19 files changed, 112 insertions(+), 111 deletions(-) [+] |
line wrap: on
line diff
--- a/src/globals.h +++ b/src/globals.h @@ -545,11 +545,11 @@ EXTERN int gui_win_y INIT(= -1); #endif #ifdef FEAT_CLIPBOARD -EXTERN VimClipboard clip_star; /* PRIMARY selection in X11 */ +EXTERN Clipboard_T clip_star; // PRIMARY selection in X11 # ifdef FEAT_X11 -EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */ +EXTERN Clipboard_T clip_plus; // CLIPBOARD selection in X11 # else -# define clip_plus clip_star /* there is only one clipboard */ +# define clip_plus clip_star // there is only one clipboard # define ONE_CLIPBOARD # endif
--- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -1394,7 +1394,7 @@ selection_received_cb(GtkWidget *widget guint time_ UNUSED, gpointer user_data UNUSED) { - VimClipboard *cbd; + Clipboard_T *cbd; char_u *text; char_u *tmpbuf = NULL; guchar *tmpbuf_utf8 = NULL; @@ -1511,7 +1511,7 @@ selection_get_cb(GtkWidget *widget U int length; int motion_type; GdkAtom type; - VimClipboard *cbd; + Clipboard_T *cbd; if (gtk_selection_data_get_selection(selection_data) == clip_plus.gtk_sel_atom) @@ -6602,7 +6602,7 @@ gui_mch_insert_lines(int row, int num_li * X Selection stuff, for cutting and pasting text to other windows. */ void -clip_mch_request_selection(VimClipboard *cbd) +clip_mch_request_selection(Clipboard_T *cbd) { GdkAtom target; unsigned i; @@ -6639,7 +6639,7 @@ clip_mch_request_selection(VimClipboard * Disown the selection. */ void -clip_mch_lose_selection(VimClipboard *cbd UNUSED) +clip_mch_lose_selection(Clipboard_T *cbd UNUSED) { if (!in_selection_clear_event) { @@ -6652,7 +6652,7 @@ clip_mch_lose_selection(VimClipboard *cb * Own the selection and return OK if it worked. */ int -clip_mch_own_selection(VimClipboard *cbd) +clip_mch_own_selection(Clipboard_T *cbd) { int success; @@ -6667,13 +6667,13 @@ clip_mch_own_selection(VimClipboard *cbd * will fill in the selection only when requested by another app. */ void -clip_mch_set_selection(VimClipboard *cbd UNUSED) +clip_mch_set_selection(Clipboard_T *cbd UNUSED) { } #if (defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) || defined(PROTO) int -clip_gtk_owner_exists(VimClipboard *cbd) +clip_gtk_owner_exists(Clipboard_T *cbd) { return gdk_selection_owner_get(cbd->gtk_sel_atom) != NULL; }
--- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -4434,7 +4434,7 @@ gui_mch_insert_lines(int row, int num_li */ void -clip_mch_request_selection(VimClipboard *cbd) +clip_mch_request_selection(Clipboard_T *cbd) { Handle textOfClip; @@ -4524,7 +4524,7 @@ clip_mch_request_selection(VimClipboard } void -clip_mch_lose_selection(VimClipboard *cbd) +clip_mch_lose_selection(Clipboard_T *cbd) { /* * TODO: Really nothing to do? @@ -4532,7 +4532,7 @@ clip_mch_lose_selection(VimClipboard *cb } int -clip_mch_own_selection(VimClipboard *cbd) +clip_mch_own_selection(Clipboard_T *cbd) { return OK; } @@ -4541,7 +4541,7 @@ clip_mch_own_selection(VimClipboard *cbd * Send the current selection to the clipboard. */ void -clip_mch_set_selection(VimClipboard *cbd) +clip_mch_set_selection(Clipboard_T *cbd) { Handle textOfClip; long scrapSize;
--- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -2872,26 +2872,26 @@ gui_x11_check_copy_area(void) */ void -clip_mch_lose_selection(VimClipboard *cbd) +clip_mch_lose_selection(Clipboard_T *cbd) { clip_x11_lose_selection(vimShell, cbd); } int -clip_mch_own_selection(VimClipboard *cbd) +clip_mch_own_selection(Clipboard_T *cbd) { return clip_x11_own_selection(vimShell, cbd); } void -clip_mch_request_selection(VimClipboard *cbd) +clip_mch_request_selection(Clipboard_T *cbd) { clip_x11_request_selection(vimShell, gui.dpy, cbd); } void clip_mch_set_selection( - VimClipboard *cbd) + Clipboard_T *cbd) { clip_x11_set_selection(cbd); }
--- a/src/ops.c +++ b/src/ops.c @@ -6460,7 +6460,7 @@ x11_export_final_selection(void) #endif void -clip_free_selection(VimClipboard *cbd) +clip_free_selection(Clipboard_T *cbd) { yankreg_T *y_ptr = y_current; @@ -6477,7 +6477,7 @@ clip_free_selection(VimClipboard *cbd) * Get the selected text and put it in register '*' or '+'. */ void -clip_get_selection(VimClipboard *cbd) +clip_get_selection(Clipboard_T *cbd) { yankreg_T *old_y_previous, *old_y_current; pos_T old_cursor; @@ -6542,7 +6542,7 @@ clip_yank_selection( int type, char_u *str, long len, - VimClipboard *cbd) + Clipboard_T *cbd) { yankreg_T *y_ptr; @@ -6562,7 +6562,7 @@ clip_yank_selection( * Returns the motion type, or -1 for failure. */ int -clip_convert_selection(char_u **str, long_u *len, VimClipboard *cbd) +clip_convert_selection(char_u **str, long_u *len, Clipboard_T *cbd) { char_u *p; int lnum;
--- a/src/os_qnx.c +++ b/src/os_qnx.c @@ -48,18 +48,18 @@ void qnx_clip_init(void) /* No support for owning the clipboard */ int -clip_mch_own_selection(VimClipboard *cbd) +clip_mch_own_selection(Clipboard_T *cbd) { return FALSE; } void -clip_mch_lose_selection(VimClipboard *cbd) +clip_mch_lose_selection(Clipboard_T *cbd) { } void -clip_mch_request_selection(VimClipboard *cbd) +clip_mch_request_selection(Clipboard_T *cbd) { int type = MLINE, clip_length = 0, is_type_set = FALSE; void *cbdata; @@ -102,7 +102,7 @@ clip_mch_request_selection(VimClipboard } void -clip_mch_set_selection(VimClipboard *cbd) +clip_mch_set_selection(Clipboard_T *cbd) { int type; long_u len;
--- a/src/os_unix.c +++ b/src/os_unix.c @@ -7775,7 +7775,7 @@ xterm_update(void) } int -clip_xterm_own_selection(VimClipboard *cbd) +clip_xterm_own_selection(Clipboard_T *cbd) { if (xterm_Shell != (Widget)0) return clip_x11_own_selection(xterm_Shell, cbd); @@ -7783,21 +7783,21 @@ clip_xterm_own_selection(VimClipboard *c } void -clip_xterm_lose_selection(VimClipboard *cbd) +clip_xterm_lose_selection(Clipboard_T *cbd) { if (xterm_Shell != (Widget)0) clip_x11_lose_selection(xterm_Shell, cbd); } void -clip_xterm_request_selection(VimClipboard *cbd) +clip_xterm_request_selection(Clipboard_T *cbd) { if (xterm_Shell != (Widget)0) clip_x11_request_selection(xterm_Shell, xterm_dpy, cbd); } void -clip_xterm_set_selection(VimClipboard *cbd) +clip_xterm_set_selection(Clipboard_T *cbd) { clip_x11_set_selection(cbd); }
--- a/src/proto.h +++ b/src/proto.h @@ -320,9 +320,9 @@ extern char *vim_SelFile(Widget toplevel #endif #if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI) /* functions in os_macosx.m */ -void clip_mch_lose_selection(VimClipboard *cbd); -int clip_mch_own_selection(VimClipboard *cbd); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); #endif #endif /* !PROTO && !NOPROTO */
--- a/src/proto/gui_gtk_x11.pro +++ b/src/proto/gui_gtk_x11.pro @@ -59,11 +59,11 @@ void gui_mch_clear_block(int row1arg, in void gui_mch_clear_all(void); void gui_mch_delete_lines(int row, int num_lines); void gui_mch_insert_lines(int row, int num_lines); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_lose_selection(VimClipboard *cbd); -int clip_mch_own_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); -int clip_gtk_owner_exists(VimClipboard *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); +int clip_gtk_owner_exists(Clipboard_T *cbd); void gui_mch_menu_grey(vimmenu_T *menu, int grey); void gui_mch_menu_hidden(vimmenu_T *menu, int hidden); void gui_mch_draw_menubar(void);
--- a/src/proto/gui_mac.pro +++ b/src/proto/gui_mac.pro @@ -111,10 +111,10 @@ void mch_post_buffer_write (buf_T *buf); void mch_errmsg(char *str); void mch_display_error(void); -void clip_mch_lose_selection(VimClipboard *cbd); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); -int clip_mch_own_selection(VimClipboard *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); pascal OSErr FindProcessBySignature( const OSType targetType, const OSType targetCreator, ProcessSerialNumberPtr psnPtr );
--- a/src/proto/gui_x11.pro +++ b/src/proto/gui_x11.pro @@ -46,10 +46,10 @@ void gui_mch_clear_block(int row1, int c void gui_mch_clear_all(void); void gui_mch_delete_lines(int row, int num_lines); void gui_mch_insert_lines(int row, int num_lines); -void clip_mch_lose_selection(VimClipboard *cbd); -int clip_mch_own_selection(VimClipboard *cbd); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); void gui_mch_menu_grey(vimmenu_T *menu, int grey); void gui_mch_menu_hidden(vimmenu_T *menu, int hidden); void gui_mch_draw_menubar(void);
--- a/src/proto/ops.pro +++ b/src/proto/ops.pro @@ -53,10 +53,10 @@ int read_viminfo_register(vir_T *virp, i void handle_viminfo_register(garray_T *values, int force); void write_viminfo_registers(FILE *fp); void x11_export_final_selection(void); -void clip_free_selection(VimClipboard *cbd); -void clip_get_selection(VimClipboard *cbd); -void clip_yank_selection(int type, char_u *str, long len, VimClipboard *cbd); -int clip_convert_selection(char_u **str, long_u *len, VimClipboard *cbd); +void clip_free_selection(Clipboard_T *cbd); +void clip_get_selection(Clipboard_T *cbd); +void clip_yank_selection(int type, char_u *str, long len, Clipboard_T *cbd); +int clip_convert_selection(char_u **str, long_u *len, Clipboard_T *cbd); void dnd_yank_drag_data(char_u *str, long len); char_u get_reg_type(int regname, long *reglen); char_u *get_reg_contents(int regname, int flags);
--- a/src/proto/os_qnx.pro +++ b/src/proto/os_qnx.pro @@ -1,8 +1,8 @@ /* os_qnx.c */ void qnx_init(void); void qnx_clip_init (void); -int clip_mch_own_selection(VimClipboard *cbd); -void clip_mch_lose_selection(VimClipboard *cbd); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); /* vim: set ft=c : */
--- a/src/proto/os_unix.pro +++ b/src/proto/os_unix.pro @@ -79,10 +79,10 @@ void setup_term_clip(void); void start_xterm_trace(int button); void stop_xterm_trace(void); void clear_xterm_clip(void); -int clip_xterm_own_selection(VimClipboard *cbd); -void clip_xterm_lose_selection(VimClipboard *cbd); -void clip_xterm_request_selection(VimClipboard *cbd); -void clip_xterm_set_selection(VimClipboard *cbd); +int clip_xterm_own_selection(Clipboard_T *cbd); +void clip_xterm_lose_selection(Clipboard_T *cbd); +void clip_xterm_request_selection(Clipboard_T *cbd); +void clip_xterm_set_selection(Clipboard_T *cbd); int xsmp_handle_requests(void); void xsmp_init(void); void xsmp_close(void);
--- a/src/proto/ui.pro +++ b/src/proto/ui.pro @@ -15,9 +15,9 @@ int ui_get_winpos(int *x, int *y, varnum void ui_breakcheck(void); void ui_breakcheck_force(int force); void clip_init(int can_use); -void clip_update_selection(VimClipboard *clip); -void clip_own_selection(VimClipboard *cbd); -void clip_lose_selection(VimClipboard *cbd); +void clip_update_selection(Clipboard_T *clip); +void clip_own_selection(Clipboard_T *cbd); +void clip_lose_selection(Clipboard_T *cbd); void start_global_changes(void); int is_clipboard_needs_update(void); void end_global_changes(void); @@ -28,15 +28,15 @@ void clip_modeless(int button, int is_cl void clip_start_selection(int col, int row, int repeated_click); void clip_process_selection(int button, int col, int row, int_u repeated_click); void clip_may_redraw_selection(int row, int col, int len); -void clip_clear_selection(VimClipboard *cbd); +void clip_clear_selection(Clipboard_T *cbd); void clip_may_clear_selection(int row1, int row2); void clip_scroll_selection(int rows); void clip_copy_modeless_selection(int both); -int clip_gen_own_selection(VimClipboard *cbd); -void clip_gen_lose_selection(VimClipboard *cbd); -void clip_gen_set_selection(VimClipboard *cbd); -void clip_gen_request_selection(VimClipboard *cbd); -int clip_gen_owner_exists(VimClipboard *cbd); +int clip_gen_own_selection(Clipboard_T *cbd); +void clip_gen_lose_selection(Clipboard_T *cbd); +void clip_gen_set_selection(Clipboard_T *cbd); +void clip_gen_request_selection(Clipboard_T *cbd); +int clip_gen_owner_exists(Clipboard_T *cbd); int vim_is_input_buf_full(void); int vim_is_input_buf_empty(void); int vim_free_in_input_buf(void); @@ -57,12 +57,12 @@ int check_row(int row); void open_app_context(void); void x11_setup_atoms(Display *dpy); void x11_setup_selection(Widget w); -void clip_x11_request_selection(Widget myShell, Display *dpy, VimClipboard *cbd); -void clip_x11_lose_selection(Widget myShell, VimClipboard *cbd); -int clip_x11_own_selection(Widget myShell, VimClipboard *cbd); -void clip_x11_set_selection(VimClipboard *cbd); -int clip_x11_owner_exists(VimClipboard *cbd); -void yank_cut_buffer0(Display *dpy, VimClipboard *cbd); +void clip_x11_request_selection(Widget myShell, Display *dpy, Clipboard_T *cbd); +void clip_x11_lose_selection(Widget myShell, Clipboard_T *cbd); +int clip_x11_own_selection(Widget myShell, Clipboard_T *cbd); +void clip_x11_set_selection(Clipboard_T *cbd); +int clip_x11_owner_exists(Clipboard_T *cbd); +void yank_cut_buffer0(Display *dpy, Clipboard_T *cbd); int jump_to_mouse(int flags, int *inclusive, int which_button); int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump); win_T *mouse_find_win(int *rowp, int *colp, mouse_find_T popup);
--- a/src/proto/winclip.pro +++ b/src/proto/winclip.pro @@ -4,10 +4,10 @@ int utf16_to_utf8(short_u *instr, int in void MultiByteToWideChar_alloc(UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen); void WideCharToMultiByte_alloc(UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef); void win_clip_init(void); -int clip_mch_own_selection(VimClipboard *cbd); -void clip_mch_lose_selection(VimClipboard *cbd); -void clip_mch_request_selection(VimClipboard *cbd); -void clip_mch_set_selection(VimClipboard *cbd); +int clip_mch_own_selection(Clipboard_T *cbd); +void clip_mch_lose_selection(Clipboard_T *cbd); +void clip_mch_request_selection(Clipboard_T *cbd); +void clip_mch_set_selection(Clipboard_T *cbd); short_u *enc_to_utf16(char_u *str, int *lenp); char_u *utf16_to_enc(short_u *str, int *lenp); void acp_to_enc(char_u *str, int str_size, char_u **out, int *outlen);
--- a/src/ui.c +++ b/src/ui.c @@ -724,7 +724,7 @@ ui_breakcheck_force(int force) void clip_init(int can_use) { - VimClipboard *cb; + Clipboard_T *cb; cb = &clip_star; for (;;) @@ -751,7 +751,7 @@ clip_init(int can_use) * this is called whenever VIsual mode is ended. */ void -clip_update_selection(VimClipboard *clip) +clip_update_selection(Clipboard_T *clip) { pos_T start, end; @@ -786,7 +786,7 @@ clip_update_selection(VimClipboard *clip } void -clip_own_selection(VimClipboard *cbd) +clip_own_selection(Clipboard_T *cbd) { /* * Also want to check somehow that we are reading from the keyboard rather @@ -822,7 +822,7 @@ clip_own_selection(VimClipboard *cbd) } void -clip_lose_selection(VimClipboard *cbd) +clip_lose_selection(Clipboard_T *cbd) { #ifdef FEAT_X11 int was_owned = cbd->owned; @@ -860,7 +860,7 @@ clip_lose_selection(VimClipboard *cbd) } static void -clip_copy_selection(VimClipboard *clip) +clip_copy_selection(Clipboard_T *clip) { if (VIsual_active && (State & NORMAL) && clip->available) { @@ -990,10 +990,9 @@ clip_isautosel_plus(void) static void clip_invert_area(int, int, int, int, int how); static void clip_invert_rectangle(int row, int col, int height, int width, int invert); -static void clip_get_word_boundaries(VimClipboard *, int, int); +static void clip_get_word_boundaries(Clipboard_T *, int, int); static int clip_get_line_end(int); -static void clip_update_modeless_selection(VimClipboard *, int, int, - int, int); +static void clip_update_modeless_selection(Clipboard_T *, int, int, int, int); /* flags for clip_invert_area() */ #define CLIP_CLEAR 1 @@ -1058,7 +1057,7 @@ clip_compare_pos( void clip_start_selection(int col, int row, int repeated_click) { - VimClipboard *cb = &clip_star; + Clipboard_T *cb = &clip_star; if (cb->state == SELECT_DONE) clip_clear_selection(cb); @@ -1130,9 +1129,9 @@ clip_process_selection( int row, int_u repeated_click) { - VimClipboard *cb = &clip_star; - int diff; - int slen = 1; /* cursor shape width */ + Clipboard_T *cb = &clip_star; + int diff; + int slen = 1; // cursor shape width if (button == MOUSE_RELEASE) { @@ -1326,7 +1325,7 @@ clip_may_redraw_selection(int row, int c * Called from outside to clear selected region from the display */ void -clip_clear_selection(VimClipboard *cbd) +clip_clear_selection(Clipboard_T *cbd) { if (cbd->state == SELECT_CLEARED) @@ -1651,7 +1650,7 @@ clip_copy_modeless_selection(int both UN #define CHAR_CLASS(c) (c <= ' ' ? ' ' : vim_iswordc(c)) static void -clip_get_word_boundaries(VimClipboard *cb, int row, int col) +clip_get_word_boundaries(Clipboard_T *cb, int row, int col) { int start_class; int temp_col; @@ -1712,7 +1711,7 @@ clip_get_line_end(int row) */ static void clip_update_modeless_selection( - VimClipboard *cb, + Clipboard_T *cb, int row1, int col1, int row2, @@ -1738,7 +1737,7 @@ clip_update_modeless_selection( } int -clip_gen_own_selection(VimClipboard *cbd) +clip_gen_own_selection(Clipboard_T *cbd) { #ifdef FEAT_XCLIPBOARD # ifdef FEAT_GUI @@ -1753,7 +1752,7 @@ clip_gen_own_selection(VimClipboard *cbd } void -clip_gen_lose_selection(VimClipboard *cbd) +clip_gen_lose_selection(Clipboard_T *cbd) { #ifdef FEAT_XCLIPBOARD # ifdef FEAT_GUI @@ -1768,7 +1767,7 @@ clip_gen_lose_selection(VimClipboard *cb } void -clip_gen_set_selection(VimClipboard *cbd) +clip_gen_set_selection(Clipboard_T *cbd) { if (!clip_did_set_selection) { @@ -1794,7 +1793,7 @@ clip_gen_set_selection(VimClipboard *cbd } void -clip_gen_request_selection(VimClipboard *cbd) +clip_gen_request_selection(Clipboard_T *cbd) { #ifdef FEAT_XCLIPBOARD # ifdef FEAT_GUI @@ -1810,7 +1809,7 @@ clip_gen_request_selection(VimClipboard #if (defined(FEAT_X11) && defined(USE_SYSTEM)) || defined(PROTO) int -clip_gen_owner_exists(VimClipboard *cbd UNUSED) +clip_gen_owner_exists(Clipboard_T *cbd UNUSED) { #ifdef FEAT_XCLIPBOARD # ifdef FEAT_GUI_GTK @@ -2372,7 +2371,7 @@ clip_x11_request_selection_cb( long_u len; char_u *p; char **text_list = NULL; - VimClipboard *cbd; + Clipboard_T *cbd; char_u *tmpbuf = NULL; if (*sel_atom == clip_plus.sel_atom) @@ -2463,7 +2462,7 @@ clip_x11_request_selection_cb( clip_x11_request_selection( Widget myShell, Display *dpy, - VimClipboard *cbd) + Clipboard_T *cbd) { XEvent event; Atom type; @@ -2566,7 +2565,7 @@ clip_x11_convert_selection_cb( static long_u save_length = 0; char_u *string; int motion_type; - VimClipboard *cbd; + Clipboard_T *cbd; int i; if (*sel_atom == clip_plus.sel_atom) @@ -2692,7 +2691,7 @@ clip_x11_lose_ownership_cb(Widget w UNUS } void -clip_x11_lose_selection(Widget myShell, VimClipboard *cbd) +clip_x11_lose_selection(Widget myShell, Clipboard_T *cbd) { XtDisownSelection(myShell, cbd->sel_atom, XtLastTimestampProcessed(XtDisplay(myShell))); @@ -2705,7 +2704,7 @@ clip_x11_notify_cb(Widget w UNUSED, Atom } int -clip_x11_own_selection(Widget myShell, VimClipboard *cbd) +clip_x11_own_selection(Widget myShell, Clipboard_T *cbd) { /* When using the GUI we have proper timestamps, use the one of the last * event. When in the console we don't get events (the terminal gets @@ -2737,14 +2736,14 @@ clip_x11_own_selection(Widget myShell, V * will fill in the selection only when requested by another app. */ void -clip_x11_set_selection(VimClipboard *cbd UNUSED) +clip_x11_set_selection(Clipboard_T *cbd UNUSED) { } #if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \ || defined(PROTO) int -clip_x11_owner_exists(VimClipboard *cbd) +clip_x11_owner_exists(Clipboard_T *cbd) { return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None; } @@ -2757,7 +2756,7 @@ clip_x11_owner_exists(VimClipboard *cbd) * Get the contents of the X CUT_BUFFER0 and put it in "cbd". */ void -yank_cut_buffer0(Display *dpy, VimClipboard *cbd) +yank_cut_buffer0(Display *dpy, Clipboard_T *cbd) { int nbytes = 0; char_u *buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0);
--- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1531, +/**/ 1530, /**/ 1529,
--- a/src/winclip.c +++ b/src/winclip.c @@ -191,7 +191,7 @@ win_clip_init(void) /* * Vim's own clipboard format recognises whether the text is char, line, * or rectangular block. Only useful for copying between two Vims. - * "VimClipboard" was used for previous versions, using the first + * "Clipboard_T" was used for previous versions, using the first * character to specify MCHAR, MLINE or MBLOCK. */ clip_star.format = RegisterClipboardFormat("VimClipboard2"); @@ -212,7 +212,7 @@ typedef struct * Make vim the owner of the current selection. Return OK upon success. */ int -clip_mch_own_selection(VimClipboard *cbd UNUSED) +clip_mch_own_selection(Clipboard_T *cbd UNUSED) { /* * Never actually own the clipboard. If another application sets the @@ -225,7 +225,7 @@ clip_mch_own_selection(VimClipboard *cbd * Make vim NOT the owner of the current selection. */ void -clip_mch_lose_selection(VimClipboard *cbd UNUSED) +clip_mch_lose_selection(Clipboard_T *cbd UNUSED) { /* Nothing needs to be done here */ } @@ -293,7 +293,7 @@ vim_open_clipboard(void) * <VN> */ void -clip_mch_request_selection(VimClipboard *cbd) +clip_mch_request_selection(Clipboard_T *cbd) { VimClipType_t metadata = { -1, -1, -1, -1 }; HGLOBAL hMem = NULL; @@ -453,7 +453,7 @@ clip_mch_request_selection(VimClipboard * Send the current selection to the clipboard. */ void -clip_mch_set_selection(VimClipboard *cbd) +clip_mch_set_selection(Clipboard_T *cbd) { char_u *str = NULL; VimClipType_t metadata;