diff --git a/src/Bitmap.c b/src/Bitmap.c index 460f7833e..ca042dc89 100644 --- a/src/Bitmap.c +++ b/src/Bitmap.c @@ -48,7 +48,7 @@ void Bitmap_Scale(Bitmap* dst, Bitmap* src, int srcX, int srcY, int srcWidth, in BitmapCol* srcRow; int x, y, width, height; - width = dst->Width; + width = dst->Width; height = dst->Height; for (y = 0; y < height; y++) { diff --git a/src/Window.c b/src/Window.c index 4b5186c60..631642c70 100644 --- a/src/Window.c +++ b/src/Window.c @@ -2829,7 +2829,13 @@ static void ProcessKeyChars(id ev) { const char* src; String str; id chars; - int i, len; + int i, len, flags; + + /* Ignore text input while cmd is held down */ + /* e.g. so Cmd + V to paste doesn't leave behind 'v' */ + flags = (int)objc_msgSend(ev, selModifiers); + if (flags & 0x000008) return; + if (flags & 0x000010) return; chars = objc_msgSend(ev, selCharacters); src = objc_msgSend(chars, selUtf8String);