diff options
| author | Glenn Morris | 2018-10-16 08:08:04 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-10-16 08:08:04 -0700 |
| commit | 722833d30e609655de4675dd5c25eb8460947f93 (patch) | |
| tree | 3d84d6cab52b3c697126d8c4ed3cffd56d24474e /src | |
| parent | 76a6417baf8ad5e2513b19f63e27c5c913555329 (diff) | |
| parent | 73babba26aa714c34aa8d9473ba5b55ce110a215 (diff) | |
| download | emacs-722833d30e609655de4675dd5c25eb8460947f93.tar.gz emacs-722833d30e609655de4675dd5c25eb8460947f93.zip | |
Merge from origin/emacs-26
73babba (origin/emacs-26) Clarify documentation of fractional vertica...
b20c51d * lisp/isearch.el (isearch-cmds): Recall absent isearch--stat...
700acbd doc/lispref/edebug.texi (Specification List) Remove obstrusiv...
1902450 Fix wording in module API documentation
e724a8f Fix redisplay of glyphless characters
8fc892d Update --without-toolkit-scroll-bars doc
80e0bfa Call GTK functions only on GTK scrollbars
91c4c46 Update the description of startup in ELisp manual
18b42c6 Use the 'line-number' face for line-number fields past EOB
a6ab8db Ensure NS frame is redrawn correctly after scroll
Conflicts:
lisp/isearch.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/conf_post.h | 8 | ||||
| -rw-r--r-- | src/dispnew.c | 7 | ||||
| -rw-r--r-- | src/gtkutil.c | 3 | ||||
| -rw-r--r-- | src/nsterm.m | 1 | ||||
| -rw-r--r-- | src/window.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 58 |
6 files changed, 52 insertions, 29 deletions
diff --git a/src/conf_post.h b/src/conf_post.h index 683a96f9368..2f8b26491b5 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -55,9 +55,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | /* The type of bool bitfields. Needed to compile Objective-C with | 57 | /* The type of bool bitfields. Needed to compile Objective-C with |
| 58 | standard GCC. It was also needed to port to pre-C99 compilers, | 58 | standard GCC, and to make sure adjacent bool_bf fields are packed |
| 59 | although we don't care about that any more. */ | 59 | into the same 1-, 2-, or 4-byte allocation unit in the MinGW |
| 60 | #if NS_IMPL_GNUSTEP | 60 | builds. It was also needed to port to pre-C99 compilers, although |
| 61 | we don't care about that any more. */ | ||
| 62 | #if NS_IMPL_GNUSTEP || defined(__MINGW32__) | ||
| 61 | typedef unsigned int bool_bf; | 63 | typedef unsigned int bool_bf; |
| 62 | #else | 64 | #else |
| 63 | typedef bool bool_bf; | 65 | typedef bool bool_bf; |
diff --git a/src/dispnew.c b/src/dispnew.c index 798413d091c..8742d584930 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -4123,7 +4123,12 @@ scrolling_window (struct window *w, bool header_line_p) | |||
| 4123 | } | 4123 | } |
| 4124 | 4124 | ||
| 4125 | #ifdef HAVE_XWIDGETS | 4125 | #ifdef HAVE_XWIDGETS |
| 4126 | /* Currently this seems needed to detect xwidget movement reliably. */ | 4126 | /* Currently this seems needed to detect xwidget movement reliably. |
| 4127 | This is most probably because an xwidget glyph is represented in | ||
| 4128 | struct glyph's 'union u' by a pointer to a struct, which takes 8 | ||
| 4129 | bytes in 64-bit builds, and thus the comparison of u.val values | ||
| 4130 | done by GLYPH_EQUAL_P doesn't work reliably, since it assumes the | ||
| 4131 | size of the union is 4 bytes. FIXME. */ | ||
| 4127 | return 0; | 4132 | return 0; |
| 4128 | #endif | 4133 | #endif |
| 4129 | 4134 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6212e1af4e8..da4a0ae13df 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1509,6 +1509,7 @@ xg_set_background_color (struct frame *f, unsigned long bg) | |||
| 1509 | block_input (); | 1509 | block_input (); |
| 1510 | xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f)); | 1510 | xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f)); |
| 1511 | 1511 | ||
| 1512 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 1512 | Lisp_Object bar; | 1513 | Lisp_Object bar; |
| 1513 | for (bar = FRAME_SCROLL_BARS (f); | 1514 | for (bar = FRAME_SCROLL_BARS (f); |
| 1514 | !NILP (bar); | 1515 | !NILP (bar); |
| @@ -1519,7 +1520,7 @@ xg_set_background_color (struct frame *f, unsigned long bg) | |||
| 1519 | GtkWidget *webox = gtk_widget_get_parent (scrollbar); | 1520 | GtkWidget *webox = gtk_widget_get_parent (scrollbar); |
| 1520 | xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f)); | 1521 | xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f)); |
| 1521 | } | 1522 | } |
| 1522 | 1523 | #endif | |
| 1523 | unblock_input (); | 1524 | unblock_input (); |
| 1524 | } | 1525 | } |
| 1525 | } | 1526 | } |
diff --git a/src/nsterm.m b/src/nsterm.m index 68ad64660ca..1ef7f5ab516 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2848,6 +2848,7 @@ ns_copy_bits (struct frame *f, NSRect src, NSRect dest) | |||
| 2848 | [FRAME_NS_VIEW (f) scrollRect: src | 2848 | [FRAME_NS_VIEW (f) scrollRect: src |
| 2849 | by: NSMakeSize (dest.origin.x - src.origin.x, | 2849 | by: NSMakeSize (dest.origin.x - src.origin.x, |
| 2850 | dest.origin.y - src.origin.y)]; | 2850 | dest.origin.y - src.origin.y)]; |
| 2851 | [FRAME_NS_VIEW (f) setNeedsDisplay:YES]; | ||
| 2851 | } | 2852 | } |
| 2852 | } | 2853 | } |
| 2853 | 2854 | ||
diff --git a/src/window.c b/src/window.c index 6cdc52f90e6..20084a15c16 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -7362,6 +7362,8 @@ value. */) | |||
| 7362 | 7362 | ||
| 7363 | DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0, | 7363 | DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0, |
| 7364 | doc: /* Return the amount by which WINDOW is scrolled vertically. | 7364 | doc: /* Return the amount by which WINDOW is scrolled vertically. |
| 7365 | This takes effect when displaying tall lines or images. | ||
| 7366 | |||
| 7365 | If WINDOW is omitted or nil, it defaults to the selected window. | 7367 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 7366 | Normally, value is a multiple of the canonical character height of WINDOW; | 7368 | Normally, value is a multiple of the canonical character height of WINDOW; |
| 7367 | optional second arg PIXELS-P means value is measured in pixels. */) | 7369 | optional second arg PIXELS-P means value is measured in pixels. */) |
| @@ -7384,6 +7386,8 @@ optional second arg PIXELS-P means value is measured in pixels. */) | |||
| 7384 | DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, | 7386 | DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, |
| 7385 | 2, 3, 0, | 7387 | 2, 3, 0, |
| 7386 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. | 7388 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. |
| 7389 | This takes effect when displaying tall lines or images. | ||
| 7390 | |||
| 7387 | WINDOW nil means use the selected window. Normally, VSCROLL is a | 7391 | WINDOW nil means use the selected window. Normally, VSCROLL is a |
| 7388 | non-negative multiple of the canonical character height of WINDOW; | 7392 | non-negative multiple of the canonical character height of WINDOW; |
| 7389 | optional third arg PIXELS-P non-nil means that VSCROLL is in pixels. | 7393 | optional third arg PIXELS-P non-nil means that VSCROLL is in pixels. |
diff --git a/src/xdisp.c b/src/xdisp.c index d61d421f08a..7b0ca477220 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2302,7 +2302,10 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row, | |||
| 2302 | ascent value, lest the hollow cursor looks funny. */ | 2302 | ascent value, lest the hollow cursor looks funny. */ |
| 2303 | y = w->phys_cursor.y; | 2303 | y = w->phys_cursor.y; |
| 2304 | ascent = row->ascent; | 2304 | ascent = row->ascent; |
| 2305 | if (row->ascent < glyph->ascent) | 2305 | /* The test for row at ZV is for when line numbers are displayed and |
| 2306 | point is at EOB: the cursor could then be smaller or larger than | ||
| 2307 | the default face's font. */ | ||
| 2308 | if (!row->ends_at_zv_p && row->ascent < glyph->ascent) | ||
| 2306 | { | 2309 | { |
| 2307 | y -= glyph->ascent - row->ascent; | 2310 | y -= glyph->ascent - row->ascent; |
| 2308 | ascent = glyph->ascent; | 2311 | ascent = glyph->ascent; |
| @@ -2312,6 +2315,9 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row, | |||
| 2312 | h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height); | 2315 | h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height); |
| 2313 | 2316 | ||
| 2314 | h = max (h0, ascent + glyph->descent); | 2317 | h = max (h0, ascent + glyph->descent); |
| 2318 | /* Don't let the cursor exceed the dimensions of the row, so that | ||
| 2319 | the upper/lower side of the box aren't clipped. */ | ||
| 2320 | h = min (h, row->height); | ||
| 2315 | h0 = min (h0, ascent + glyph->descent); | 2321 | h0 = min (h0, ascent + glyph->descent); |
| 2316 | 2322 | ||
| 2317 | y0 = WINDOW_HEADER_LINE_HEIGHT (w); | 2323 | y0 = WINDOW_HEADER_LINE_HEIGHT (w); |
| @@ -21232,14 +21238,11 @@ maybe_produce_line_number (struct it *it) | |||
| 21232 | for (const char *p = lnum_buf; *p; p++) | 21238 | for (const char *p = lnum_buf; *p; p++) |
| 21233 | { | 21239 | { |
| 21234 | /* For continuation lines and lines after ZV, instead of a line | 21240 | /* For continuation lines and lines after ZV, instead of a line |
| 21235 | number, produce a blank prefix of the same width. Use the | 21241 | number, produce a blank prefix of the same width. */ |
| 21236 | default face for the blank field beyond ZV. */ | 21242 | if (lnum_face_id != current_lnum_face_id |
| 21237 | if (beyond_zv) | 21243 | && (EQ (Vdisplay_line_numbers, Qvisual) |
| 21238 | tem_it.face_id = it->base_face_id; | 21244 | ? this_line == 0 |
| 21239 | else if (lnum_face_id != current_lnum_face_id | 21245 | : this_line == it->pt_lnum)) |
| 21240 | && (EQ (Vdisplay_line_numbers, Qvisual) | ||
| 21241 | ? this_line == 0 | ||
| 21242 | : this_line == it->pt_lnum)) | ||
| 21243 | tem_it.face_id = current_lnum_face_id; | 21246 | tem_it.face_id = current_lnum_face_id; |
| 21244 | else | 21247 | else |
| 21245 | tem_it.face_id = lnum_face_id; | 21248 | tem_it.face_id = lnum_face_id; |
| @@ -21292,23 +21295,30 @@ maybe_produce_line_number (struct it *it) | |||
| 21292 | } | 21295 | } |
| 21293 | } | 21296 | } |
| 21294 | 21297 | ||
| 21295 | /* Update IT's metrics due to glyphs produced for line numbers. */ | 21298 | /* Update IT's metrics due to glyphs produced for line numbers. |
| 21296 | if (it->glyph_row) | 21299 | Don't do that for rows beyond ZV, to avoid displaying a cursor of |
| 21300 | different dimensions there. */ | ||
| 21301 | if (!beyond_zv) | ||
| 21297 | { | 21302 | { |
| 21298 | struct glyph_row *row = it->glyph_row; | 21303 | if (it->glyph_row) |
| 21304 | { | ||
| 21305 | struct glyph_row *row = it->glyph_row; | ||
| 21299 | 21306 | ||
| 21300 | it->max_ascent = max (row->ascent, tem_it.max_ascent); | 21307 | it->max_ascent = max (row->ascent, tem_it.max_ascent); |
| 21301 | it->max_descent = max (row->height - row->ascent, tem_it.max_descent); | 21308 | it->max_descent = max (row->height - row->ascent, tem_it.max_descent); |
| 21302 | it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); | 21309 | it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); |
| 21303 | it->max_phys_descent = max (row->phys_height - row->phys_ascent, | 21310 | it->max_phys_descent = max (row->phys_height - row->phys_ascent, |
| 21304 | tem_it.max_phys_descent); | 21311 | tem_it.max_phys_descent); |
| 21305 | } | 21312 | } |
| 21306 | else | 21313 | else |
| 21307 | { | 21314 | { |
| 21308 | it->max_ascent = max (it->max_ascent, tem_it.max_ascent); | 21315 | it->max_ascent = max (it->max_ascent, tem_it.max_ascent); |
| 21309 | it->max_descent = max (it->max_descent, tem_it.max_descent); | 21316 | it->max_descent = max (it->max_descent, tem_it.max_descent); |
| 21310 | it->max_phys_ascent = max (it->max_phys_ascent, tem_it.max_phys_ascent); | 21317 | it->max_phys_ascent = max (it->max_phys_ascent, |
| 21311 | it->max_phys_descent = max (it->max_phys_descent, tem_it.max_phys_descent); | 21318 | tem_it.max_phys_ascent); |
| 21319 | it->max_phys_descent = max (it->max_phys_descent, | ||
| 21320 | tem_it.max_phys_descent); | ||
| 21321 | } | ||
| 21312 | } | 21322 | } |
| 21313 | 21323 | ||
| 21314 | it->line_number_produced_p = true; | 21324 | it->line_number_produced_p = true; |