summaryrefslogtreecommitdiffstats
path: root/src/gui_mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r--src/gui_mac.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c
index 9253aa1013..50e96695e3 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -4930,16 +4930,6 @@ clip_mch_request_selection(cbd)
#endif
tempclip[scrapSize] = 0;
- searchCR = (char *)tempclip;
- while (searchCR != NULL)
- {
- searchCR = strchr(searchCR, '\r');
-
- if (searchCR != NULL)
- searchCR[0] = '\n';
-
- }
-
#if defined(FEAT_MBYTE) && defined(USE_CARBONIZED)
/* Convert from utf-16 (clipboard) */
size_t encLen = 0;
@@ -4951,6 +4941,17 @@ clip_mch_request_selection(cbd)
tempclip = to;
}
#endif
+
+ searchCR = (char *)tempclip;
+ while (searchCR != NULL)
+ {
+ searchCR = strchr(searchCR, '\r');
+
+ if (searchCR != NULL)
+ searchCR[0] = '\n';
+
+ }
+
clip_yank_selection(type, tempclip, scrapSize, cbd);
vim_free(tempclip);