diff options
| author | Glenn Morris | 2018-08-26 15:10:50 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-08-26 15:10:50 -0700 |
| commit | 1afd313334c93cb5b0a7a378bd635a54dc1d6a9e (patch) | |
| tree | cb95ad44d35f9b32a8acc8bb00b7291f38549c52 /src | |
| parent | 18d52b90a1692a47cea5b5e905a58a3b2c6c9a64 (diff) | |
| parent | 54fb383af6f6af7b72c28f38b308d9b24d2af4f6 (diff) | |
| download | emacs-1afd313334c93cb5b0a7a378bd635a54dc1d6a9e.tar.gz emacs-1afd313334c93cb5b0a7a378bd635a54dc1d6a9e.zip | |
Merge from origin/emacs-26
54fb383 (origin/emacs-26) Fix detection of freed emacs_values (Bug#32...
769d0cd ; Fix out-of-tree build for mod-test.so
9a1329e Avoid crashes with very wide TTY frames on MS-Windows
9a613d3 Prevent `modify-file-local-variable-prop-line' from adding ex...
624e7dc Update GNOME bugtracker URLs
51ef6d5 Clarify in the Emacs manual that ChangeLog files are not used
6e08019 Recognize codepage 65001 as a valid encoding
1a350d7 ; * etc/NEWS: Fix format of first lines of some entries.
22d1f53 Avoid compilation warning in nt/addpm.c
7bc9ce7 Fix duplicate custom group names in bibtex.el
a9cf938 Fix outdated text in the Calc manual
Conflicts:
etc/NEWS
etc/PROBLEMS
src/emacs-module.c
src/gtkutil.c
src/image.c
src/xterm.c
test/Makefile.in
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 8 | ||||
| -rw-r--r-- | src/w32console.c | 30 |
2 files changed, 30 insertions, 8 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index e7ba17426bf..f2844c40d0f 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -344,20 +344,20 @@ module_free_global_ref (emacs_env *env, emacs_value ref) | |||
| 344 | Lisp_Object globals = global_env_private.values; | 344 | Lisp_Object globals = global_env_private.values; |
| 345 | Lisp_Object prev = Qnil; | 345 | Lisp_Object prev = Qnil; |
| 346 | ptrdiff_t count = 0; | 346 | ptrdiff_t count = 0; |
| 347 | for (Lisp_Object tail = global_env_private.values; CONSP (tail); | 347 | for (Lisp_Object tail = globals; CONSP (tail); |
| 348 | tail = XCDR (tail)) | 348 | tail = XCDR (tail)) |
| 349 | { | 349 | { |
| 350 | emacs_value global = xmint_pointer (XCAR (globals)); | 350 | emacs_value global = xmint_pointer (XCAR (tail)); |
| 351 | if (global == ref) | 351 | if (global == ref) |
| 352 | { | 352 | { |
| 353 | if (NILP (prev)) | 353 | if (NILP (prev)) |
| 354 | global_env_private.values = XCDR (globals); | 354 | global_env_private.values = XCDR (globals); |
| 355 | else | 355 | else |
| 356 | XSETCDR (prev, XCDR (globals)); | 356 | XSETCDR (prev, XCDR (tail)); |
| 357 | return; | 357 | return; |
| 358 | } | 358 | } |
| 359 | ++count; | 359 | ++count; |
| 360 | prev = globals; | 360 | prev = tail; |
| 361 | } | 361 | } |
| 362 | module_abort ("Global value was not found in list of %"pD"d globals", | 362 | module_abort ("Global value was not found in list of %"pD"d globals", |
| 363 | count); | 363 | count); |
diff --git a/src/w32console.c b/src/w32console.c index 6c3cf06bfd3..9f9db68f0ef 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -140,23 +140,36 @@ w32con_clear_frame (struct frame *f) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | static struct glyph glyph_base[256]; | 143 | static struct glyph glyph_base[80]; |
| 144 | static struct glyph *glyphs = glyph_base; | ||
| 145 | static size_t glyphs_len = ARRAYELTS (glyph_base); | ||
| 144 | static BOOL ceol_initialized = FALSE; | 146 | static BOOL ceol_initialized = FALSE; |
| 145 | 147 | ||
| 146 | /* Clear from Cursor to end (what's "standout marker"?). */ | 148 | /* Clear from Cursor to end (what's "standout marker"?). */ |
| 147 | static void | 149 | static void |
| 148 | w32con_clear_end_of_line (struct frame *f, int end) | 150 | w32con_clear_end_of_line (struct frame *f, int end) |
| 149 | { | 151 | { |
| 152 | /* Time to reallocate our "empty row"? With today's large screens, | ||
| 153 | it is not unthinkable to see TTY frames well in excess of | ||
| 154 | 80-character width. */ | ||
| 155 | if (end - cursor_coords.X > glyphs_len) | ||
| 156 | { | ||
| 157 | if (glyphs == glyph_base) | ||
| 158 | glyphs = NULL; | ||
| 159 | glyphs = xrealloc (glyphs, FRAME_COLS (f) * sizeof (struct glyph)); | ||
| 160 | glyphs_len = FRAME_COLS (f); | ||
| 161 | ceol_initialized = FALSE; | ||
| 162 | } | ||
| 150 | if (!ceol_initialized) | 163 | if (!ceol_initialized) |
| 151 | { | 164 | { |
| 152 | int i; | 165 | int i; |
| 153 | for (i = 0; i < 256; i++) | 166 | for (i = 0; i < glyphs_len; i++) |
| 154 | { | 167 | { |
| 155 | memcpy (&glyph_base[i], &space_glyph, sizeof (struct glyph)); | 168 | memcpy (&glyphs[i], &space_glyph, sizeof (struct glyph)); |
| 156 | } | 169 | } |
| 157 | ceol_initialized = TRUE; | 170 | ceol_initialized = TRUE; |
| 158 | } | 171 | } |
| 159 | w32con_write_glyphs (f, glyph_base, end - cursor_coords.X); /* fencepost ? */ | 172 | w32con_write_glyphs (f, glyphs, end - cursor_coords.X); |
| 160 | } | 173 | } |
| 161 | 174 | ||
| 162 | /* Insert n lines at vpos. if n is negative delete -n lines. */ | 175 | /* Insert n lines at vpos. if n is negative delete -n lines. */ |
| @@ -772,6 +785,15 @@ initialize_w32_display (struct terminal *term, int *width, int *height) | |||
| 772 | *width = 1 + info.srWindow.Right - info.srWindow.Left; | 785 | *width = 1 + info.srWindow.Right - info.srWindow.Left; |
| 773 | } | 786 | } |
| 774 | 787 | ||
| 788 | /* Force reinitialization of the "empty row" buffer, in case they | ||
| 789 | dumped from a running session. */ | ||
| 790 | if (glyphs != glyph_base) | ||
| 791 | { | ||
| 792 | glyphs = NULL; | ||
| 793 | glyphs_len = 0; | ||
| 794 | ceol_initialized = FALSE; | ||
| 795 | } | ||
| 796 | |||
| 775 | if (os_subtype == OS_NT) | 797 | if (os_subtype == OS_NT) |
| 776 | w32_console_unicode_input = 1; | 798 | w32_console_unicode_input = 1; |
| 777 | else | 799 | else |