diff options
| author | Eli Zaretskii | 2022-04-18 21:04:57 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-04-18 21:04:57 +0300 |
| commit | a45c1c45a29cbf9416bb03f77c99b383db43e7a0 (patch) | |
| tree | f259753ae762ea7c86f1ed1b18d3452c1806c528 /src/w32console.c | |
| parent | 850074636e73509b09c28e965c1af054a84f4069 (diff) | |
| download | emacs-a45c1c45a29cbf9416bb03f77c99b383db43e7a0.tar.gz emacs-a45c1c45a29cbf9416bb03f77c99b383db43e7a0.zip | |
Minor improvements in 'restart-emacs' on MS-Windows
* src/w32.c (w32_reexec_emacs): Explicitly request a new console
for the restarted Emacs -nw, and specify its dimensions. Specify
NULL instead of security attributes, per examples on the Internet.
* src/w32console.c (initialize_w32_display): Check errors in call
to GetConsoleCursorInfo.
Diffstat (limited to 'src/w32console.c')
| -rw-r--r-- | src/w32console.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/w32console.c b/src/w32console.c index 12e1f397894..09749126e03 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -716,10 +716,10 @@ initialize_w32_display (struct terminal *term, int *width, int *height) | |||
| 716 | 716 | ||
| 717 | if (cur_screen == INVALID_HANDLE_VALUE) | 717 | if (cur_screen == INVALID_HANDLE_VALUE) |
| 718 | { | 718 | { |
| 719 | printf ("CreateConsoleScreenBuffer failed in ResetTerm\n"); | 719 | printf ("CreateConsoleScreenBuffer failed in initialize_w32_display\n"); |
| 720 | printf ("LastError = 0x%lx\n", GetLastError ()); | 720 | printf ("LastError = 0x%lx\n", GetLastError ()); |
| 721 | fflush (stdout); | 721 | fflush (stdout); |
| 722 | exit (0); | 722 | exit (1); |
| 723 | } | 723 | } |
| 724 | #else | 724 | #else |
| 725 | cur_screen = prev_screen; | 725 | cur_screen = prev_screen; |
| @@ -760,7 +760,13 @@ initialize_w32_display (struct terminal *term, int *width, int *height) | |||
| 760 | } | 760 | } |
| 761 | } | 761 | } |
| 762 | 762 | ||
| 763 | GetConsoleScreenBufferInfo (cur_screen, &info); | 763 | if (!GetConsoleScreenBufferInfo (cur_screen, &info)) |
| 764 | { | ||
| 765 | printf ("GetConsoleScreenBufferInfo failed in initialize_w32_display\n"); | ||
| 766 | printf ("LastError = 0x%lx\n", GetLastError ()); | ||
| 767 | fflush (stdout); | ||
| 768 | exit (1); | ||
| 769 | } | ||
| 764 | 770 | ||
| 765 | char_attr_normal = info.wAttributes; | 771 | char_attr_normal = info.wAttributes; |
| 766 | 772 | ||