# | Line 23 | Line 23 | |
---|---|---|
23 | #include <X11/Xlib.h> | |
24 | ||
25 | #include "clip.h" | |
26 | + | #include "prefs.h" |
27 | ||
28 | #define DEBUG 0 | |
29 | #include "debug.h" | |
# | Line 52 | Line 53 | static const uint8 mac2iso[0x80] = { | |
53 | 0xaf, 0x20, 0xb7, 0xb0, 0xb8, 0x22, 0xb8, 0x20 | |
54 | }; | |
55 | ||
56 | + | // Flag: Don't convert clipboard text |
57 | + | static bool no_clip_conversion; |
58 | + | |
59 | ||
60 | /* | |
61 | * Initialization | |
# | Line 59 | Line 63 | static const uint8 mac2iso[0x80] = { | |
63 | ||
64 | void ClipInit(void) | |
65 | { | |
66 | + | no_clip_conversion = PrefsFindBool("noclipconversion"); |
67 | } | |
68 | ||
69 | ||
# | Line 94 | Line 99 | void PutScrap(uint32 type, void *scrap, | |
99 | if (c < 0x80) { | |
100 | if (c == 13) // CR -> LF | |
101 | c = 10; | |
102 | < | } else |
102 | > | } else if (!no_clip_conversion) |
103 | c = mac2iso[c & 0x7f]; | |
104 | *q++ = c; | |
105 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |