From 57bd70555d973be21904f7d1736550e3b2a1b502 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Sun, 27 Oct 2002 11:05:05 +0000 Subject: [PATCH] One more compatibility fix for clipboard resident, fixed dead key - space combinations --- docs/notework.txt | 2 ++ goldlib/gall/gkbdbase.cpp | 4 ++-- goldlib/gall/gutldos.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index d70337b..e20b4fb 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed deadkey-space combinations in Win32 version. + - Compatibility fix for http://www.chat.ru/~tulser/clipbrd.zip. Though it is not GoldED+ fault. diff --git a/goldlib/gall/gkbdbase.cpp b/goldlib/gall/gkbdbase.cpp index c563a4e..f80d7a7 100644 --- a/goldlib/gall/gkbdbase.cpp +++ b/goldlib/gall/gkbdbase.cpp @@ -744,7 +744,7 @@ struct kbd { { VK_TAB, Key_Tab, Key_S_Tab, Key_C_Tab, Key_A_Tab }, { VK_RETURN, Key_Ent, Key_Ent, Key_C_Ent, Key_A_Ent }, { VK_ESCAPE, Key_Esc, Key_Esc, Key_Esc, Key_A_Esc }, - { VK_SPACE, Key_Space, Key_Space, Key_Space, Key_Space }, + { VK_SPACE, -1, -1, Key_Space, Key_Space }, { '0', Key_0, Key_S_0, -1, Key_A_0 }, { '1', Key_1, Key_S_1, -1, Key_A_1 }, @@ -894,7 +894,7 @@ int gkbd_nt2bios(INPUT_RECORD& inp) { if(c != -1) if(ascii and not (right_alt_same_as_left ? (state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) : (state & LEFT_ALT_PRESSED))) if(isalnum(keycode)) - return ascii; + return (ascii == ' ') ? Key_Space : ascii; if(ISEXT(c)) return EXTVAL(c) << 8; diff --git a/goldlib/gall/gutldos.cpp b/goldlib/gall/gutldos.cpp index 624b02e..b684dcb 100644 --- a/goldlib/gall/gutldos.cpp +++ b/goldlib/gall/gutldos.cpp @@ -231,9 +231,10 @@ char* g_get_clip_text(void) { cpu.bx(0x0000); cpu.genint(0x2f); if(cpu.ax() != 0x0000) { - text = (char *) throw_malloc(len); + text = (char *) throw_malloc(len+1); if(text) movedata(selector, 0, _my_ds(), (unsigned) text, len); + text[len] = NUL; } __dpmi_free_dos_memory(selector); }