Move comment about ECHO and LINE input modes to a more sensible position.
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sun, 19 Jun 2005 13:57:50 +0000 (13:57 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sun, 19 Jun 2005 13:57:50 +0000 (13:57 +0000)
Spotted by Ben Rudiak-Gould.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5976 cda61777-01e9-0310-a592-d414129be87e

windows/winplink.c

index fdf0190..ae80bf9 100644 (file)
@@ -598,16 +598,16 @@ int main(int argc, char **argv)
     inhandle = GetStdHandle(STD_INPUT_HANDLE);
     outhandle = GetStdHandle(STD_OUTPUT_HANDLE);
     errhandle = GetStdHandle(STD_ERROR_HANDLE);
-    GetConsoleMode(inhandle, &orig_console_mode);
-    SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT);
-
-    main_thread_id = GetCurrentThreadId();
-
     /*
      * Turn off ECHO and LINE input modes. We don't care if this
      * call fails, because we know we aren't necessarily running in
      * a console.
      */
+    GetConsoleMode(inhandle, &orig_console_mode);
+    SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT);
+
+    main_thread_id = GetCurrentThreadId();
+
     handles[0] = netevent;
     handles[1] = stdinevent;
     handles[2] = stdoutevent;