aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2018-08-29 08:24:03 -0700
committerGlenn Morris2018-08-29 08:24:03 -0700
commitd8bef4b519624de20baa1428dd103f61dfb220fa (patch)
treeed458e2d88b9a0a422fd46e50c1d2654d24b07a9 /src
parentb28d5333e0144acc7385339578d907196c4b6f3e (diff)
parent2670cbf9a87eb498d73770c381ca51657d390a1e (diff)
downloademacs-d8bef4b519624de20baa1428dd103f61dfb220fa.tar.gz
emacs-d8bef4b519624de20baa1428dd103f61dfb220fa.zip
Merge from origin/emacs-26
2670cbf (origin/emacs-26) ; * configure.ac: Remove outdated comment (... 3b71bef admin.el: respect environment settings for makeinfo etc 3764ab4 * etc/PROBLEMS: New entry about GTK+ 3 crash with some X serv... 9d61344 Index profiler commands in elisp manual f088817 Fix math-imaginary-i check fca935e ; Let pre-commit git hook check merged in changes (Bug#29197) fe06fcc Avoid infinite hscrolling loops when line numbers are displayed 63e59c8 Avoid crashes in malformed defvar 785682c * configure.ac (emacs_config_features): Add GLIB, XDBE, XIM. 2695b7e * configure.ac: Doc fixes related to --with-xim. d0d162c Small checkdoc quoting fix (bug#32546) Conflicts: configure.ac
Diffstat (limited to 'src')
-rw-r--r--src/eval.c2
-rw-r--r--src/xdisp.c20
2 files changed, 13 insertions, 9 deletions
diff --git a/src/eval.c b/src/eval.c
index 8745ba9ef99..50de60c936c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -787,7 +787,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
787 LOADHIST_ATTACH (sym); 787 LOADHIST_ATTACH (sym);
788 } 788 }
789 else if (!NILP (Vinternal_interpreter_environment) 789 else if (!NILP (Vinternal_interpreter_environment)
790 && !XSYMBOL (sym)->u.s.declared_special) 790 && (SYMBOLP (sym) && !XSYMBOL (sym)->u.s.declared_special))
791 /* A simple (defvar foo) with lexical scoping does "nothing" except 791 /* A simple (defvar foo) with lexical scoping does "nothing" except
792 declare that var to be dynamically scoped *locally* (i.e. within 792 declare that var to be dynamically scoped *locally* (i.e. within
793 the current file or let-block). */ 793 the current file or let-block). */
diff --git a/src/xdisp.c b/src/xdisp.c
index 11b14e2cf95..04033665d76 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21185,8 +21185,12 @@ maybe_produce_line_number (struct it *it)
21185 an L2R paragraph. */ 21185 an L2R paragraph. */
21186 tem_it.bidi_it.resolved_level = 2; 21186 tem_it.bidi_it.resolved_level = 2;
21187 21187
21188 /* We must leave space for 2 glyphs for continuation and truncation,
21189 and at least one glyph for buffer text. */
21190 int width_limit =
21191 tem_it.last_visible_x - tem_it.first_visible_x
21192 - 3 * FRAME_COLUMN_WIDTH (it->f);
21188 /* Produce glyphs for the line number in a scratch glyph_row. */ 21193 /* Produce glyphs for the line number in a scratch glyph_row. */
21189 int n_glyphs_before;
21190 for (const char *p = lnum_buf; *p; p++) 21194 for (const char *p = lnum_buf; *p; p++)
21191 { 21195 {
21192 /* For continuation lines and lines after ZV, instead of a line 21196 /* For continuation lines and lines after ZV, instead of a line
@@ -21210,18 +21214,18 @@ maybe_produce_line_number (struct it *it)
21210 else 21214 else
21211 tem_it.c = tem_it.char_to_display = *p; 21215 tem_it.c = tem_it.char_to_display = *p;
21212 tem_it.len = 1; 21216 tem_it.len = 1;
21213 n_glyphs_before = scratch_glyph_row.used[TEXT_AREA];
21214 /* Make sure these glyphs will have a "position" of -1. */ 21217 /* Make sure these glyphs will have a "position" of -1. */
21215 SET_TEXT_POS (tem_it.position, -1, -1); 21218 SET_TEXT_POS (tem_it.position, -1, -1);
21216 PRODUCE_GLYPHS (&tem_it); 21219 PRODUCE_GLYPHS (&tem_it);
21217 21220
21218 /* Stop producing glyphs if we don't have enough space on 21221 /* Stop producing glyphs, and refrain from producing the line
21219 this line. FIXME: should we refrain from producing the 21222 number, if we don't have enough space on this line. */
21220 line number at all in that case? */ 21223 if (tem_it.current_x >= width_limit)
21221 if (tem_it.current_x > tem_it.last_visible_x)
21222 { 21224 {
21223 scratch_glyph_row.used[TEXT_AREA] = n_glyphs_before; 21225 it->lnum_width = 0;
21224 break; 21226 it->lnum_pixel_width = 0;
21227 bidi_unshelve_cache (itdata, false);
21228 return;
21225 } 21229 }
21226 } 21230 }
21227 21231