diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ops.c | 3 | ||||
-rw-r--r-- | src/os_macosx.m | 6 | ||||
-rw-r--r-- | src/proto.h | 7 |
3 files changed, 12 insertions, 4 deletions
@@ -4155,7 +4155,8 @@ do_join(count, insert_space, save_undo) char_u *cend; char_u *newp; char_u *spaces; /* number of spaces inserte before a line */ - int endcurr1, endcurr2; + int endcurr1 = NUL; + int endcurr2 = NUL; int currsize = 0; /* size of the current line */ int sumsize = 0; /* size of the long new line */ linenr_T t; diff --git a/src/os_macosx.m b/src/os_macosx.m index 7067df4b7..dcde55174 100644 --- a/src/os_macosx.m +++ b/src/os_macosx.m @@ -686,7 +686,7 @@ clip_mch_request_selection(VimClipboard *cbd) n = [mstring replaceOccurrencesOfString:@"\x0d" withString:@"\x0a" options:0 range:range]; } - + /* Scan for newline character to decide whether the string should be * pasted line-wise or character-wise. */ @@ -734,7 +734,7 @@ clip_mch_set_selection(VimClipboard *cbd) cbd->owned = TRUE; clip_get_selection(cbd); cbd->owned = FALSE; - + /* Get the text to put on the pasteboard. */ long_u llen = 0; char_u *str = 0; int motion_type = clip_convert_selection(&str, &llen, cbd); @@ -771,7 +771,7 @@ clip_mch_set_selection(VimClipboard *cbd) [pb setPropertyList:plist forType:VimPboardType]; [pb setString:string forType:NSStringPboardType]; - + [string release]; } diff --git a/src/proto.h b/src/proto.h index 01db6895f..c39f7f00b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -277,6 +277,13 @@ extern char *vim_SelFile __ARGS((Widget toplevel, char *prompt, char *init_path, #ifdef MACOS_CONVERT # include "os_mac_conv.pro" #endif +#if defined(MACOS_X_UNIX) && 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); +#endif #ifdef __BORLANDC__ # define _PROTO_H |