summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2011-06-20 00:25:44 +0200
committerBram Moolenaar <bram@vim.org>2011-06-20 00:25:44 +0200
commitbe79b5dbad4470e9f6af027d04b90c81f37c10e7 (patch)
tree05c58f0235ec02cfdef6e3c4bae7abdff979cd15
parentbfff898e8b9e2110f7bc269768886663614384df (diff)
downloadvim-be79b5dbad4470e9f6af027d04b90c81f37c10e7.tar.gz
updated for version 7.3.227v7.3.227v7-3-227
Problem: Mac OS doesn't have the linewise clipboard fix. Solution: Also change the Mac OS file. (Bjorn Winckler)
-rw-r--r--src/os_macosx.m16
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 12 deletions
diff --git a/src/os_macosx.m b/src/os_macosx.m
index bc646677..d919f633 100644
--- a/src/os_macosx.m
+++ b/src/os_macosx.m
@@ -65,7 +65,7 @@ clip_mch_request_selection(VimClipboard *cbd)
NSString *bestType = [pb availableTypeFromArray:supportedTypes];
if (!bestType) goto releasepool;
- int motion_type = MCHAR;
+ int motion_type = MAUTO;
NSString *string = nil;
if ([bestType isEqual:VimPboardType])
@@ -89,9 +89,7 @@ clip_mch_request_selection(VimClipboard *cbd)
if (!string)
{
- /* Use NSStringPboardType. The motion type is set to line-wise if the
- * string contains at least one EOL character, otherwise it is set to
- * character-wise (block-wise is never used).
+ /* Use NSStringPboardType. The motion type is detected automatically.
*/
NSMutableString *mstring =
[[pb stringForType:NSStringPboardType] mutableCopy];
@@ -108,19 +106,13 @@ clip_mch_request_selection(VimClipboard *cbd)
options:0 range:range];
}
- /* Scan for newline character to decide whether the string should be
- * pasted line-wise or character-wise.
- */
- motion_type = MCHAR;
- if (0 < n || NSNotFound != [mstring rangeOfString:@"\n"].location)
- motion_type = MLINE;
-
string = mstring;
}
+ /* Default to MAUTO, uses MCHAR or MLINE depending on trailing NL. */
if (!(MCHAR == motion_type || MLINE == motion_type || MBLOCK == motion_type
|| MAUTO == motion_type))
- motion_type = MCHAR;
+ motion_type = MAUTO;
char_u *str = (char_u*)[string UTF8String];
int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
diff --git a/src/version.c b/src/version.c
index 746a145a..dd16231b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 227,
+/**/
226,
/**/
225,