diff --git a/Quake/console.c b/Quake/console.c index 4e7d4337..c1110470 100644 --- a/Quake/console.c +++ b/Quake/console.c @@ -1135,6 +1135,10 @@ void Con_DrawNotify (void) } } +extern qpic_t *pic_ovr, *pic_ins; //johnfitz -- new cursor handling +extern double key_blinktime; +extern int key_insert; + /* ================ Con_DrawInput -- johnfitz -- modified to allow insert editing @@ -1144,9 +1148,6 @@ The input line scrolls horizontally if typing goes beyond the right edge */ void Con_DrawInput (void) { - extern qpic_t *pic_ovr, *pic_ins; //johnfitz -- new cursor handling - extern double key_blinktime; - extern int key_insert; int i, ofs; if (key_dest != key_console && !con_forcedup) diff --git a/Quake/keys.c b/Quake/keys.c index 91b41a17..7515183d 100644 --- a/Quake/keys.c +++ b/Quake/keys.c @@ -229,15 +229,15 @@ Key_Console -- johnfitz -- heavy revision Interactive line editing and console scrollback ==================== */ -extern char key_tabpartial[MAXCMDLINE]; -extern int con_vislines; +extern char *con_text, key_tabpartial[MAXCMDLINE]; +extern int con_current, con_linewidth, con_vislines; void Key_Console (int key) { static char current[MAXCMDLINE] = ""; - int history_line_last; + int history_line_last, i, x; size_t len; - char *workline = key_lines[edit_line]; + char *line, *workline = key_lines[edit_line]; switch (key) { @@ -302,10 +302,6 @@ void Key_Console (int key) if (keydown[K_CTRL]) { //skip initial empty lines - int i, x; - char *line; - extern int con_current, con_linewidth; - extern char *con_text; for (i = con_current - con_totallines + 1; i <= con_current; i++) { @@ -425,20 +421,24 @@ void Key_Console (int key) history_line= edit_line; return; } - } + break; + case 'v': + case 'V': #if defined(__MACOSX__) || defined(__MACOS__) - /* Cmd+V paste request for Mac : */ - if (keydown[K_COMMAND] && (key == 'V' || key == 'v')) - { - PasteToConsole(); - return; - } + /* Cmd+V paste request for Mac : */ + if (keydown[K_COMMAND]) + { + PasteToConsole(); + return; + } #endif - if (keydown[K_CTRL] && (key=='V' || key=='v')) - { - PasteToConsole(); - return; + if (keydown[K_CTRL]) + { + PasteToConsole(); + return; + } + break; } if (key < 32 || key > 127)