aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog34
-rw-r--r--src/macfont.h1
-rw-r--r--src/macfont.m2
-rw-r--r--src/nsterm.h1
-rw-r--r--src/nsterm.m21
-rw-r--r--src/w16select.c2
-rw-r--r--src/w32select.c2
-rw-r--r--src/xdisp.c31
8 files changed, 88 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d4f6321faf7..25732ac9f5d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,37 @@
12014-07-21 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsterm.m (applicationDidFinishLaunching:): Call
4 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
5 (antialiasThresholdDidChange:): New method for EmacsApp.
6
7 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
8
9 * macfont.m (macfont_update_antialias_threshold): Remove static.
10
11 * macfont.h (macfont_update_antialias_threshold): Declare.
12
132014-07-21 Eli Zaretskii <eliz@gnu.org>
14
15 * w32select.c (setup_windows_coding_system): Apply
16 CODING_ANNOTATION_MASK to the common_flags member of struct
17 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
18
19 * w16select.c (Fw16_get_clipboard_data): Apply
20 CODING_ANNOTATION_MASK to the common_flags member of struct
21 coding_system.
22
23 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
24 buffer position where we are to start the iteration.
25 (handle_invisible_prop): Record in it->stop_charpos the position
26 where the invisible text ends. (Bug#18035)
27 (hscroll_window_tree): Don't try hscrolling windows whose cursor
28 row has zero buffer position as their start position. Reported by
29 martin rudalics <rudalics@gmx.at>.
30
31 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
32 infinite looping in redisplay when display lines don't have enough
33 space to display even a single character. (Bug#18036)
34
12014-07-20 Dmitry Antipov <dmantipov@yandex.ru> 352014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2 36
3 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position. 37 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
diff --git a/src/macfont.h b/src/macfont.h
index 8b451357e42..7421cd63a79 100644
--- a/src/macfont.h
+++ b/src/macfont.h
@@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */
144 144
145extern void mac_register_font_driver (struct frame *f); 145extern void mac_register_font_driver (struct frame *f);
146extern void *macfont_get_nsctfont (struct font *font); 146extern void *macfont_get_nsctfont (struct font *font);
147extern void macfont_update_antialias_threshold (void);
147 148
diff --git a/src/macfont.m b/src/macfont.m
index 60f261d5549..0d702873220 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -728,7 +728,7 @@ static const struct
728 728
729static CGFloat macfont_antialias_threshold; 729static CGFloat macfont_antialias_threshold;
730 730
731static void 731void
732macfont_update_antialias_threshold (void) 732macfont_update_antialias_threshold (void)
733{ 733{
734 int threshold; 734 int threshold;
diff --git a/src/nsterm.h b/src/nsterm.h
index 2619b710073..7ed23f583f6 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -111,6 +111,7 @@ typedef float EmacsCGFloat;
111#endif 111#endif
112} 112}
113- (void)logNotification: (NSNotification *)notification; 113- (void)logNotification: (NSNotification *)notification;
114- (void)antialiasThresholdDidChange:(NSNotification *)notification;
114- (void)sendEvent: (NSEvent *)theEvent; 115- (void)sendEvent: (NSEvent *)theEvent;
115- (void)showPreferencesWindow: (id)sender; 116- (void)showPreferencesWindow: (id)sender;
116- (BOOL) openFile: (NSString *)fileName; 117- (BOOL) openFile: (NSString *)fileName;
diff --git a/src/nsterm.m b/src/nsterm.m
index 9420031645d..64f3be6cc06 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4670,9 +4670,30 @@ ns_term_shutdown (int sig)
4670 ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES; 4670 ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
4671#endif 4671#endif
4672 [NSApp setServicesProvider: NSApp]; 4672 [NSApp setServicesProvider: NSApp];
4673
4674 [self antialiasThresholdDidChange:nil];
4675#ifdef NS_IMPL_COCOA
4676#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4677 [[NSNotificationCenter defaultCenter]
4678 addObserver:self
4679 selector:@selector(antialiasThresholdDidChange:)
4680 name:NSAntialiasThresholdChangedNotification
4681 object:nil];
4682#endif
4683#endif
4684
4673 ns_send_appdefined (-2); 4685 ns_send_appdefined (-2);
4674} 4686}
4675 4687
4688- (void)antialiasThresholdDidChange:(NSNotification *)notification
4689{
4690#ifdef NS_IMPL_COCOA
4691#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4692 macfont_update_antialias_threshold ();
4693#endif
4694#endif
4695}
4696
4676 4697
4677/* Termination sequences: 4698/* Termination sequences:
4678 C-x C-c: 4699 C-x C-c:
diff --git a/src/w16select.c b/src/w16select.c
index 1e4d35b721b..c229ba5816a 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -600,7 +600,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
600 coding.mode |= CODING_MODE_LAST_BLOCK; 600 coding.mode |= CODING_MODE_LAST_BLOCK;
601 /* We explicitly disable composition handling because selection 601 /* We explicitly disable composition handling because selection
602 data should not contain any composition sequence. */ 602 data should not contain any composition sequence. */
603 coding.mode &= CODING_ANNOTATION_MASK; 603 coding.common_flags &= ~CODING_ANNOTATION_MASK;
604 decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt); 604 decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt);
605 ret = coding.dst_object; 605 ret = coding.dst_object;
606 Vlast_coding_system_used = CODING_ID_NAME (coding.id); 606 Vlast_coding_system_used = CODING_ID_NAME (coding.id);
diff --git a/src/w32select.c b/src/w32select.c
index 2ae25858bd2..7c21dde01a5 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -670,7 +670,7 @@ setup_windows_coding_system (Lisp_Object coding_system,
670 which both apply to ISO6429 only. We don't know if these really 670 which both apply to ISO6429 only. We don't know if these really
671 need to be unset on Windows, but it probably doesn't hurt 671 need to be unset on Windows, but it probably doesn't hurt
672 either. */ 672 either. */
673 coding->mode &= ~CODING_ANNOTATION_MASK; 673 coding->common_flags &= ~CODING_ANNOTATION_MASK;
674 coding->mode |= CODING_MODE_LAST_BLOCK | CODING_MODE_SAFE_ENCODING; 674 coding->mode |= CODING_MODE_LAST_BLOCK | CODING_MODE_SAFE_ENCODING;
675} 675}
676 676
diff --git a/src/xdisp.c b/src/xdisp.c
index f1e01146e9f..a340c6e00dd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3034,6 +3034,7 @@ init_iterator (struct it *it, struct window *w,
3034 getting overlays and face properties from that position. */ 3034 getting overlays and face properties from that position. */
3035 if (charpos >= BUF_BEG (current_buffer)) 3035 if (charpos >= BUF_BEG (current_buffer))
3036 { 3036 {
3037 it->stop_charpos = charpos;
3037 it->end_charpos = ZV; 3038 it->end_charpos = ZV;
3038 eassert (charpos == BYTE_TO_CHAR (bytepos)); 3039 eassert (charpos == BYTE_TO_CHAR (bytepos));
3039 IT_CHARPOS (*it) = charpos; 3040 IT_CHARPOS (*it) = charpos;
@@ -4546,7 +4547,24 @@ handle_invisible_prop (struct it *it)
4546 && get_overlay_strings (it, it->stop_charpos)) 4547 && get_overlay_strings (it, it->stop_charpos))
4547 { 4548 {
4548 handled = HANDLED_RECOMPUTE_PROPS; 4549 handled = HANDLED_RECOMPUTE_PROPS;
4549 it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; 4550 if (it->sp > 0)
4551 {
4552 it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
4553 /* The call to get_overlay_strings above recomputes
4554 it->stop_charpos, but it only considers changes
4555 in properties and overlays beyond iterator's
4556 current position. This causes us to miss changes
4557 that happen exactly where the invisible property
4558 ended. So we play it safe here and force the
4559 iterator to check for potential stop positions
4560 immediately after the invisible text. Note that
4561 if get_overlay_strings returns non-zero, it
4562 normally also pushed the iterator stack, so we
4563 need to update the stop position in the slot
4564 below the current one. */
4565 it->stack[it->sp - 1].stop_charpos
4566 = CHARPOS (it->stack[it->sp - 1].current.pos);
4567 }
4550 } 4568 }
4551 else if (display_ellipsis_p) 4569 else if (display_ellipsis_p)
4552 { 4570 {
@@ -9351,7 +9369,7 @@ move_it_vertically_backward (struct it *it, int dy)
9351 9369
9352 /* Estimate how many newlines we must move back. */ 9370 /* Estimate how many newlines we must move back. */
9353 nlines = max (1, dy / default_line_pixel_height (it->w)); 9371 nlines = max (1, dy / default_line_pixel_height (it->w));
9354 if (it->line_wrap == TRUNCATE) 9372 if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
9355 pos_limit = BEGV; 9373 pos_limit = BEGV;
9356 else 9374 else
9357 pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); 9375 pos_limit = max (start_pos - nlines * nchars_per_row, BEGV);
@@ -9606,7 +9624,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos)
9606 /* Go back -DVPOS buffer lines, but no farther than -DVPOS full 9624 /* Go back -DVPOS buffer lines, but no farther than -DVPOS full
9607 screen lines, and reseat the iterator there. */ 9625 screen lines, and reseat the iterator there. */
9608 start_charpos = IT_CHARPOS (*it); 9626 start_charpos = IT_CHARPOS (*it);
9609 if (it->line_wrap == TRUNCATE) 9627 if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
9610 pos_limit = BEGV; 9628 pos_limit = BEGV;
9611 else 9629 else
9612 pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); 9630 pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);
@@ -12847,6 +12865,13 @@ hscroll_window_tree (Lisp_Object window)
12847 h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w); 12865 h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w);
12848 12866
12849 if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->contents)) 12867 if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->contents))
12868 /* In some pathological cases, like restoring a window
12869 configuration into a frame that is much smaller than
12870 the one from which the configuration was saved, we
12871 get glyph rows whose start and end have zero buffer
12872 positions, which we cannot handle below. Just skip
12873 such windows. */
12874 && CHARPOS (cursor_row->start.pos) >= BUF_BEG (w->contents)
12850 /* For left-to-right rows, hscroll when cursor is either 12875 /* For left-to-right rows, hscroll when cursor is either
12851 (i) inside the right hscroll margin, or (ii) if it is 12876 (i) inside the right hscroll margin, or (ii) if it is
12852 inside the left margin and the window is already 12877 inside the left margin and the window is already