summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0063
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-08-03 15:06:38 -1000
committerSam Bingner <sam@bingner.com>2018-08-03 15:06:38 -1000
commit135b410607f008d3709a7b1374f3f37924eb9fe4 (patch)
treef4756ef3a354f6001360db894db010df85177f76 /data/vim/patches/8.1.0063
parentbd1eb51da0d3f250793e1868d73babdf495c921f (diff)
Update vim
Diffstat (limited to 'data/vim/patches/8.1.0063')
-rw-r--r--data/vim/patches/8.1.0063123
1 files changed, 123 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0063 b/data/vim/patches/8.1.0063
new file mode 100644
index 000000000..b1018460a
--- /dev/null
+++ b/data/vim/patches/8.1.0063
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0063
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0063
+Problem: Mac: NSStringPboardType is deprecated.
+Solution: Use NSPasteboardTypeString. (Akshay Hegde, closes #3022)
+Files: src/os_macosx.m
+
+
+*** ../vim-8.1.0062/src/os_macosx.m 2018-03-06 17:53:40.000000000 +0100
+--- src/os_macosx.m 2018-06-17 15:00:15.344692977 +0200
+***************
+*** 63,70 ****
+--- 63,75 ----
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
++ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
++ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
++ NSPasteboardTypeString, nil];
++ #else
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSStringPboardType, nil];
++ #endif
+ NSString *bestType = [pb availableTypeFromArray:supportedTypes];
+ if (!bestType) goto releasepool;
+
+***************
+*** 76,82 ****
+ /* This type should consist of an array with two objects:
+ * 1. motion type (NSNumber)
+ * 2. text (NSString)
+! * If this is not the case we fall back on using NSStringPboardType.
+ */
+ id plist = [pb propertyListForType:VimPboardType];
+ if ([plist isKindOfClass:[NSArray class]] && [plist count] == 2)
+--- 81,87 ----
+ /* This type should consist of an array with two objects:
+ * 1. motion type (NSNumber)
+ * 2. text (NSString)
+! * If this is not the case we fall back on using NSPasteboardTypeString.
+ */
+ id plist = [pb propertyListForType:VimPboardType];
+ if ([plist isKindOfClass:[NSArray class]] && [plist count] == 2)
+***************
+*** 92,101 ****
+
+ if (!string)
+ {
+! /* Use NSStringPboardType. The motion type is detected automatically.
+ */
+ NSMutableString *mstring =
+ [[pb stringForType:NSStringPboardType] mutableCopy];
+ if (!mstring) goto releasepool;
+
+ /* Replace unrecognized end-of-line sequences with \x0a (line feed). */
+--- 97,111 ----
+
+ if (!string)
+ {
+! /* Use NSPasteboardTypeString. The motion type is detected automatically.
+ */
++ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
++ NSMutableString *mstring =
++ [[pb stringForType:NSPasteboardTypeString] mutableCopy];
++ #else
+ NSMutableString *mstring =
+ [[pb stringForType:NSStringPboardType] mutableCopy];
++ #endif
+ if (!mstring) goto releasepool;
+
+ /* Replace unrecognized end-of-line sequences with \x0a (line feed). */
+***************
+*** 178,192 ****
+--- 188,211 ----
+
+ /* See clip_mch_request_selection() for info on pasteboard types. */
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
++ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
++ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
++ NSPasteboardTypeString, nil];
++ #else
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSStringPboardType, nil];
++ #endif
+ [pb declareTypes:supportedTypes owner:nil];
+
+ NSNumber *motion = [NSNumber numberWithInt:motion_type];
+ NSArray *plist = [NSArray arrayWithObjects:motion, string, nil];
+ [pb setPropertyList:plist forType:VimPboardType];
+
++ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
++ [pb setString:string forType:NSPasteboardTypeString];
++ #else
+ [pb setString:string forType:NSStringPboardType];
++ #endif
+
+ [string release];
+ }
+*** ../vim-8.1.0062/src/version.c 2018-06-17 14:47:50.657309005 +0200
+--- src/version.c 2018-06-17 15:00:06.472745233 +0200
+***************
+*** 763,764 ****
+--- 763,766 ----
+ { /* Add new patch number below this line */
++ /**/
++ 63,
+ /**/
+
+--
+Q: Should I clean my house or work on Vim?
+A: Whatever contains more bugs.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///